Welcome to "Animate Website" Demo!

See CSS animations and transitions in action.

1. CSS Transition Example: Interactive Button

Hover over the button below. It uses CSS transitions to smoothly change its background color, text color, and scale. This provides immediate visual feedback to the user.

How it works:

transition-all: Applies the transition to all animatable properties.

duration-300: Sets the transition duration to 300ms.

ease-in-out: Defines the timing function for a smooth acceleration and deceleration.

On :hover, properties like bg-blue-700 and scale-105 are applied.

2. CSS Keyframe Animation Examples

A. Spinning Loader

This is a classic loading spinner created using @keyframes. The rotate transform property is animated from 0 to 360 degrees infinitely.

B. Pulsing Element

This element uses @keyframes to create a subtle pulsing glow effect, animating its box-shadow.

Pulse

How it works:

The @keyframes spin rule defines a rotation from 0 to 360 degrees.

The .loader class applies this animation, making it run for 1.5s, linearly, and infinitely.

The @keyframes pulse-glow rule defines changes in box-shadow at 0%, 50%, and 100%.

The .pulse-element class applies this animation.

3. JavaScript Animations (Next Steps)

For more complex or interactive animations (like an element following your mouse, or physics-based effects), you would typically use JavaScript with requestAnimationFrame() or animation libraries like GSAP or Anime.js.

This section is a placeholder. We could add a JavaScript animation example here later if you'd like!