WhoKnew Views™ | Custom CSS – Effects & Animations

Skip to main content
Table of Contents
Print

Unleash Cinematic Motion: Advanced Effects & Animation Techniques

WhoKnew Views™ includes six independent animation systems—icon, background, border, wrapper, scale, and rotation—providing dozens of pre-built motion effects. But what if you want a pulsing glow that changes colors? A 3D flip reveal? A morphing shape that shifts between geometric forms? Custom CSS transforms your counter into a cinematic experience with unlimited animation possibilities.

💡 What This Article Covers

The plugin offers fade, pulse, bounce, shake, rotate, wiggle, zoom, gradient shifts, border chases, neon pulses, scale effects, and rotation loops. This guide explores custom keyframe animations, complex multi-property transforms, SVG filters, clip-path morphing, scroll-triggered animations, physics-based motion, parallax effects, perspective 3D transforms, and advanced timing functions that aren’t available in the standard interface.

🎯 Animation Fundamentals: The CSS Toolkit

CSS animations rely on three core properties:

PropertyPurposeUse Case
@keyframesDefines animation steps from start to finishComplex multi-stage animations
animationApplies keyframes to an elementName, duration, timing, iteration
transitionSmoothly animates property changesHover effects, state changes

⚡ Custom Keyframe Animations

Keyframes give you frame-by-frame control over animations. Define what happens at 0%, 50%, 100%, or any percentage in between.

Example: Color-Shifting Glow Pulse

The plugin’s neon pulse animates shadow intensity. Let’s create one that changes colors as it pulses:

@keyframes colorShiftPulse {
  0% {
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.6); /* Blue */
  }
  33% {
    box-shadow: 0 0 30px rgba(139, 92, 246, 0.8); /* Purple */
  }
  66% {
    box-shadow: 0 0 30px rgba(236, 72, 153, 0.8); /* Pink */
  }
  100% {
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.6); /* Back to blue */
  }
}

.product-views-counter .view-counter-wrapper {
  animation: colorShiftPulse 3s ease-in-out infinite !important;
}

Result: The counter’s shadow cycles through blue → purple → pink → blue in a smooth 3-second loop. The shadow grows brighter at purple/pink peaks, creating a breathing, color-shifting aura.

Example: Bouncing Elastic Effect

The plugin’s “bounce” animation is simple. Let’s create a physics-accurate elastic bounce:

@keyframes elasticBounce {
  0% {
    transform: translateY(0) scaleY(1);
  }
  20% {
    transform: translateY(-20px) scaleY(1.1); /* Jump up, stretch */
  }
  40% {
    transform: translateY(0) scaleY(0.9); /* Land, compress */
  }
  50% {
    transform: translateY(-10px) scaleY(1.05); /* Small bounce */
  }
  60% {
    transform: translateY(0) scaleY(0.95); /* Settle */
  }
  70% {
    transform: translateY(-5px) scaleY(1.02); /* Tiny bounce */
  }
  100% {
    transform: translateY(0) scaleY(1); /* Rest */
  }
}

.product-views-counter .view-counter-wrapper {
  animation: elasticBounce 1.2s ease-out !important;
}

Result: The counter jumps, lands with a squash, bounces twice more with decreasing intensity, then settles—mimicking real-world gravity and elasticity. Perfect for attention-grabbing entrance animations.

⚡ Pro Tip: Combining Transforms

Notice how elasticBounce combines translateY() and scaleY() in the same transform property. You can layer translate, scale, rotate, skew, and perspective together. Always write multiple transforms in one transform statement: transform: translateX(10px) rotate(45deg) scale(1.1);

Example: 3D Card Flip Reveal

The plugin doesn’t offer 3D flips. Let’s build a perspective flip where the counter rotates in 3D space:

@keyframes flip3D {
  0% {
    transform: perspective(600px) rotateY(0deg);
    opacity: 0;
  }
  50% {
    transform: perspective(600px) rotateY(90deg);
    opacity: 0.5;
  }
  100% {
    transform: perspective(600px) rotateY(180deg);
    opacity: 1;
  }
}

.product-views-counter .view-counter-wrapper {
  animation: flip3D 0.8s ease-out !important;
  transform-style: preserve-3d !important;
}

Result: The counter appears to flip like a coin, rotating 180° around the vertical axis. The perspective(600px) creates depth perception, making the flip look three-dimensional rather than flat. Combines rotation with opacity fade for a smooth reveal.

🌊 Advanced Transform Effects

Beyond the plugin’s built-in scale/rotation, CSS transforms enable skewing, 3D rotation, matrix transforms, and origin manipulation.

Skew: Perspective Distortion

@keyframes skewWave {
  0%, 100% {
    transform: skewX(0deg) skewY(0deg);
  }
  25% {
    transform: skewX(5deg) skewY(2deg);
  }
  50% {
    transform: skewX(0deg) skewY(-2deg);
  }
  75% {
    transform: skewX(-5deg) skewY(2deg);
  }
}

.product-views-counter .view-counter-wrapper {
  animation: skewWave 2s ease-in-out infinite !important;
}

Result: The counter warps subtly back and forth, creating a liquid or jelly-like wobble. Skewing is rarely used but incredibly distinctive—perfect for playful brands or surreal designs.

3D Rotation: Cube Tumble

@keyframes cubeTumble {
  0% {
    transform: perspective(800px) rotateX(0deg) rotateY(0deg);
  }
  50% {
    transform: perspective(800px) rotateX(180deg) rotateY(180deg);
  }
  100% {
    transform: perspective(800px) rotateX(360deg) rotateY(360deg);
  }
}

.product-views-counter .view-counter-wrapper {
  animation: cubeTumble 3s linear infinite !important;
}

Result: The counter tumbles through 3D space like a die being rolled—rotating on both X and Y axes simultaneously. The perspective() value controls how “close” you are to the object (lower = more dramatic distortion).

Transform Origin: Rotation Pivot Point

By default, elements rotate around their center. Change this to create asymmetric motion:

@keyframes swingFromCorner {
  0%, 100% {
    transform: rotate(0deg);
  }
  25% {
    transform: rotate(10deg);
  }
  75% {
    transform: rotate(-10deg);
  }
}

.product-views-counter .view-counter-wrapper {
  transform-origin: top left !important; /* Pivot from top-left corner */
  animation: swingFromCorner 2s ease-in-out infinite !important;
}

Result: The counter swings like a hanging sign, pivoting from its top-left corner instead of its center. Try top center for a pendulum effect, or bottom right for a door-swinging motion.

🎨 Multi-Property Animations

The most compelling animations combine multiple properties simultaneously—position, scale, opacity, color, shadow, and more.

Example: Emerging Glow-Up

@keyframes emergingGlow {
  0% {
    transform: translateY(30px) scale(0.8);
    opacity: 0;
    filter: blur(10px) brightness(0.5);
    box-shadow: 0 0 0 rgba(59, 130, 246, 0);
  }
  100% {
    transform: translateY(0) scale(1);
    opacity: 1;
    filter: blur(0) brightness(1);
    box-shadow: 0 8px 32px rgba(59, 130, 246, 0.4);
  }
}

.product-views-counter .view-counter-wrapper {
  animation: emergingGlow 1s ease-out forwards !important;
}

Result: The counter starts below its final position, small, invisible, blurred, dimmed, and shadowless. It then rises, grows, becomes sharp, brightens, and gains a glowing shadow—creating a cinematic “powering on” entrance. The forwards keyword makes it stay at 100% instead of snapping back to 0%.

Example: Typing Reveal (Width Animation)

@keyframes typewriter {
  from {
    width: 0;
    opacity: 0;
  }
  to {
    width: 100%;
    opacity: 1;
  }
}

.product-views-counter .view-counter-wrapper {
  overflow: hidden !important;
  white-space: nowrap !important;
  animation: typewriter 1.5s steps(40) forwards !important;
}

Result: The counter types out from left to right like a typewriter, revealing one character at a time. The steps(40) timing function (instead of ease) creates a stepped animation rather than smooth—mimicking mechanical typing. Requires overflow: hidden to clip the text.

🌈 Advanced Gradient Animations

The plugin animates gradients by shifting background-position. Let’s explore hue rotation, multi-gradient layers, and animated gradient borders.

Hue Rotation: Infinite Rainbow Cycle

@keyframes rainbowCycle {
  0% {
    filter: hue-rotate(0deg);
  }
  100% {
    filter: hue-rotate(360deg);
  }
}

.product-views-counter .view-counter-wrapper {
  background: linear-gradient(135deg, #ff0080, #7928ca) !important;
  animation: rainbowCycle 10s linear infinite !important;
}

Result: The gradient’s colors shift through the entire spectrum—pink becomes orange, orange becomes yellow, yellow becomes green, etc.—in a continuous 10-second loop. The hue-rotate() filter rotates all colors by X degrees on the color wheel.

Animated Gradient Border (Pseudo-Element Technique)

Remember, border-image doesn’t support border-radius. For animated gradient borders with rounded corners, use a rotating pseudo-element:

@keyframes rotateBorder {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.product-views-counter .view-counter-wrapper {
  position: relative !important;
  background: #1e293b !important;
  border-radius: 16px !important;
  padding: 16px 32px !important;
  z-index: 1 !important;
}

.product-views-counter .view-counter-wrapper::before {
  content: '' !important;
  position: absolute !important;
  inset: -3px !important;
  background: conic-gradient(from 0deg, #ff0080, #ff8c00, #40e0d0, #ff0080) !important;
  border-radius: 16px !important;
  z-index: -1 !important;
  animation: rotateBorder 4s linear infinite !important;
}

Result: A spinning rainbow border that cycles around the counter continuously. The ::before pseudo-element is slightly larger than the wrapper (inset: -3px), rotates via conic-gradient, and sits behind the wrapper (z-index: -1), creating the illusion of an animated gradient border.

✂️ Clip-Path Animations: Shape Morphing

clip-path clips an element to a specific shape. Animating it creates morphing effects—not available in the plugin at all.

Example: Circle-to-Square Morph

@keyframes morphShape {
  0% {
    clip-path: circle(50% at 50% 50%); /* Circle */
  }
  50% {
    clip-path: polygon(20% 20%, 80% 20%, 80% 80%, 20% 80%); /* Square */
  }
  100% {
    clip-path: circle(50% at 50% 50%); /* Back to circle */
  }
}

.product-views-counter .view-counter-wrapper {
  animation: morphShape 3s ease-in-out infinite !important;
}

Result: The counter’s shape morphs from a circle to a square and back—the edges literally bend into new forms. This works because both shapes are defined with coordinate-based paths. Highly unusual and eye-catching.

Example: Diagonal Wipe Reveal

@keyframes diagonalWipe {
  0% {
    clip-path: polygon(0 0, 0 0, 0 100%, 0 100%);
  }
  100% {
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
  }
}

.product-views-counter .view-counter-wrapper {
  animation: diagonalWipe 0.8s ease-out forwards !important;
}

Result: The counter wipes in from left to right like a sliding door. The clip-path starts with zero width (all four points at x=0) and expands to full width. More dramatic than a simple fade—creates a directional reveal.

📐 Clip-Path Complexity

For smooth morphing, both keyframe states must have the same number of points. A circle() can morph to ellipse(), and a polygon() with 4 points can morph to another polygon() with 4 points. Use tools like Clippy to generate complex shapes.

📜 Scroll-Triggered Animations

The plugin offers “On Scroll” triggers, but CSS alone can’t detect scroll position. Combine CSS with JavaScript’s Intersection Observer (already used for scroll reveals) for custom scroll effects.

Example: Parallax Vertical Shift

Add a CSS class when the counter enters the viewport:

/* Initial state: off-screen below */
.product-views-counter .view-counter-wrapper {
  transform: translateY(100px) !important;
  opacity: 0 !important;
  transition: transform 1s ease-out, opacity 1s ease-out !important;
}

/* When visible class is added by Intersection Observer */
.product-views-counter.visible .view-counter-wrapper {
  transform: translateY(0) !important;
  opacity: 1 !important;
}

Result: The counter starts 100px below its final position and invisible. When it scrolls into view (triggering the .visible class), it slides up and fades in over 1 second. This uses transition instead of animation for state-based motion.

💻 JavaScript Required

This technique requires a small JavaScript snippet to add the .visible class when the counter is in view. WhoKnew Views already uses Intersection Observer for its “On Scroll” triggers, so this pattern is compatible. For advanced scroll effects (parallax depth, scroll-speed multipliers), you’ll need custom JS.

⏱️ Advanced Timing Functions

The plugin uses ease, ease-in, ease-out, and linear. CSS offers cubic-bezier curves for precise control and spring physics simulation.

Cubic-Bezier: Custom Easing Curves

@keyframes smoothBounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-30px);
  }
}

.product-views-counter .view-counter-wrapper {
  animation: smoothBounce 1s cubic-bezier(0.68, -0.55, 0.265, 1.55) infinite !important;
}

Result: A bounce with overshoot—the counter rises past -30px before settling back. The cubic-bezier values create this “elastic” feeling. Use cubic-bezier.com to visually design custom curves.

Timing FunctionFeelUse Case
easeSlow start, fast middle, slow endGeneral-purpose, natural
ease-in-outSymmetrical slow start/endSmooth loops, elegant
ease-outFast start, gradual slowdownEntrances, appearing elements
ease-inSlow start, fast endExits, disappearing elements
linearConstant speed, no accelerationMechanical motion, looping rotations
steps(10)Jumps in discrete incrementsSprite animations, typewriter
cubic-bezier(0.68, -0.55, 0.265, 1.55)Elastic overshootBouncy, playful entrances

🎭 SVG Filter Effects

CSS filter provides blur, brightness, contrast, etc. For artistic distortion, displacement maps, and turbulence, use inline SVG filters.

Example: Liquid Distortion Effect

<svg style="position: absolute; width: 0; height: 0;">
  <filter id="liquidDistort">
    <feTurbulence type="fractalNoise" baseFrequency="0.01" numOctaves="3">
      <animate attributeName="baseFrequency" from="0.01" to="0.03" dur="5s" repeatCount="indefinite"/>
    </feTurbulence>
    <feDisplacementMap in="SourceGraphic" scale="10"/>
  </filter>
</svg>

.product-views-counter .view-counter-wrapper {
  filter: url(#liquidDistort) !important;
}

Result: The counter appears to shimmer and distort like it’s underwater or viewed through heat waves. The SVG feTurbulence creates noise, feDisplacementMap displaces pixels based on that noise, and <animate> makes the distortion evolve over time. Highly experimental and visually stunning.

⚠️ Performance Warning

SVG filters are GPU-intensive. Use sparingly on critical elements. Test on mid-range devices to ensure smooth performance. Avoid combining SVG filters with other heavy effects like backdrop-filter or complex keyframe animations.

🔥 Hover-Triggered Complex Animations

The plugin’s hover effects are simple (icon spin, shadow intensity, scale). Let’s create multi-stage hover choreography.

Example: Hover Lift with Shadow Expansion

.product-views-counter .view-counter-wrapper {
  transition: transform 0.3s ease, box-shadow 0.3s ease !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
}

.product-views-counter .view-counter-wrapper:hover {
  transform: translateY(-8px) !important;
  box-shadow: 0 16px 48px rgba(59, 130, 246, 0.4) !important;
}

.product-views-counter:hover .view-counter-icon {
  animation: spinOnce 0.5s ease-out !important;
}

@keyframes spinOnce {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

Result: On hover:

  1. The wrapper lifts 8px upward
  2. The shadow expands and changes color from gray to blue
  3. The icon spins 360° once

All three effects happen simultaneously, creating a cohesive hover experience. Notice we use transition for the wrapper (smooth property changes) and animation for the icon (keyframe-based rotation).

Example: Staggered Text/Icon Entrance on Hover

.product-views-counter .view-counter-text,
.product-views-counter .view-counter-icon {
  transition: transform 0.4s ease, opacity 0.4s ease !important;
}

.product-views-counter:hover .view-counter-icon {
  transform: translateX(10px) !important;
  transition-delay: 0s !important;
}

.product-views-counter:hover .view-counter-text {
  transform: translateX(10px) !important;
  transition-delay: 0.1s !important; /* Delayed 0.1s after icon */
}

Result: On hover, the icon slides right first, then the text follows 0.1 seconds later—creating a staggered cascade effect. This transition-delay technique adds rhythm and sophistication to hover interactions.

📱 Mobile-Specific Animation Overrides

Complex animations can drain mobile battery and cause janky performance. Simplify or disable them for smaller screens:

/* Desktop: Complex 3D rotation */
.product-views-counter .view-counter-wrapper {
  animation: cubeTumble 3s linear infinite !important;
}

/* Mobile: Simple fade-in only */
@media (max-width: 768px) {
  .product-views-counter .view-counter-wrapper {
    animation: fadeIn 1s ease-out !important;
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

Result: Desktop users see the dramatic 3D tumble; mobile users see a clean fade-in. Preserves visual impact on capable devices while ensuring smooth performance on mobile.

🎯 Per-Product Animation Targeting

Apply custom animations to specific products based on category, price, or ID:

/* Premium products (Product ID 1234): Luxurious gold shimmer */
@keyframes goldShimmer {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.3) hue-rotate(10deg); }
}

.postid-1234 .product-views-counter .view-counter-wrapper {
  background: linear-gradient(135deg, #fbbf24, #f59e0b) !important;
  animation: goldShimmer 2s ease-in-out infinite !important;
}

/* Sale items (Product ID 5678): Urgent red pulse */
@keyframes urgentPulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 rgba(239, 68, 68, 0); }
  50% { transform: scale(1.05); box-shadow: 0 0 20px rgba(239, 68, 68, 0.6); }
}

.postid-5678 .product-views-counter .view-counter-wrapper {
  background: #ef4444 !important;
  animation: urgentPulse 1s ease-in-out infinite !important;
}

Result: Premium products get a slow, elegant gold shimmer; sale items get a faster, attention-grabbing red pulse. Animations reinforce product messaging automatically.

🚀 Real-World Animation Examples

Example 1: “Holographic Reveal” Counter

@keyframes holoReveal {
  0% {
    opacity: 0;
    transform: translateY(20px) rotateX(-15deg);
    filter: blur(10px) hue-rotate(0deg);
  }
  100% {
    opacity: 1;
    transform: translateY(0) rotateX(0deg);
    filter: blur(0) hue-rotate(360deg);
  }
}

.product-views-counter .view-counter-wrapper {
  background: linear-gradient(135deg, #667eea, #764ba2, #f093fb) !important;
  animation: holoReveal 1.5s ease-out forwards !important;
  transform-style: preserve-3d !important;
}

Use Case: Tech brands, futuristic products. The counter materializes with a 3D tilt, blur clearing, and hue cycling—like a hologram powering on.

Example 2: “Page Curl” Entrance

@keyframes pageCurl {
  0% {
    transform: perspective(600px) rotateY(-90deg);
    transform-origin: left center;
    opacity: 0;
  }
  100% {
    transform: perspective(600px) rotateY(0deg);
    transform-origin: left center;
    opacity: 1;
  }
}

.product-views-counter .view-counter-wrapper {
  animation: pageCurl 0.8s ease-out !important;
}

Use Case: Book stores, paper products, classic brands. The counter unfolds from the left edge like a page being turned.

Example 3: “Neon Sign Flicker” On Load

@keyframes neonFlicker {
  0%, 5%, 10%, 15%, 100% {
    opacity: 1;
    text-shadow: 0 0 10px #00ffff, 0 0 20px #00ffff;
  }
  2.5%, 7.5%, 12.5% {
    opacity: 0.3;
    text-shadow: 0 0 2px #00ffff;
  }
}

.product-views-counter .view-counter-text,
.product-views-counter .view-counter-icon {
  animation: neonFlicker 1.5s ease-in-out !important;
  color: #00ffff !important;
}

Use Case: Bars, nightlife venues, retro brands. The text/icon flickers like a buzzing neon sign powering on, then stabilizes.

⚠️ Troubleshooting

IssueSolution
Animation doesn’t playEnsure !important is used. Check that @keyframes name matches animation reference. Verify selector targets .product-views-counter .view-counter-wrapper.
Animation snaps back to startAdd animation-fill-mode: forwards or use forwards in shorthand: animation: myAnim 1s ease forwards.
Text becomes unreadable during animationAvoid extreme blur, hue-rotate, or skew on text. Apply effects to .view-counter-wrapper only, not text/icon.
Janky/stuttering motionUse transform and opacity for animations (GPU-accelerated). Avoid animating width, height, top, left (CPU-intensive).
3D transform looks flatAdd transform-style: preserve-3d to parent. Ensure perspective() is included in transform: transform: perspective(800px) rotateY(45deg);
Clip-path morph looks choppyBoth keyframe states must have same number of points. A 4-point polygon can’t smoothly morph to a 6-point polygon.
SVG filter doesn’t applyEnsure SVG is in the page HTML (not in Custom CSS). Use filter: url(#filterID) with the correct id reference.

📚 Quick Reference: Animation Properties

PropertyWhat It DoesQuick Example
animationApplies keyframe animationpulse 2s ease infinite
@keyframesDefines animation stages0% {…} 100% {…}
transitionSmooth property changesall 0.3s ease
transformMove, scale, rotate, skewtranslateY(10px) scale(1.1)
transform-originSets rotation/scale pivot pointtop left, center
perspective()Adds 3D depth perceptionperspective(800px)
clip-pathClips element to shapecircle(50%), polygon(…)
filterVisual effectsblur(5px), hue-rotate(90deg)
animation-delayDelays animation start0.5s
animation-iteration-countHow many times to loopinfinite, 3
animation-fill-modeState before/after animationforwards, backwards
animation-play-statePause/resume animationpaused, running

Share