<svg width="100%" height="200"> <style> @keyframes anim { 0%{ opacity: 0; } 100% { opacity: 1;} } </style> <rect width="100%" height="200" style="fill:red;"></rect> <rect id="animatedRect" width="100%" height="200" style="fill:blue; animation: anim 0.1s infinite"></rect> </svg>