Spinning Ball Animation with Glow Effect using CSS
Spinning ball animation can be easily created using the transform property to rotate the ball. The animation iteration count is applied as infinite to get the never-ending spinning animation. To get the glowing effect, box-shadow is used.
- Create an HTML file with the name index.html.
- Create a div element in the index.html file and give a class name ball.
- Add style to this class name.
- Create an animation named spinball using @keyframes rule. Use transform property to rotate the ball.
- Apply 2 color inset combination in the box-shadow property to get the glowing spinning effect.
- Spinning speed can be adjusted by changing the animation duration.
Attention reader! Don’t stop learning now. Get hold of all the important HTML concepts with the Web Design for Beginners | HTML course.