CSS Blinds animation effect

CSS Blinds animation

Pure CSS window blinds animation from top to bottom using the CSS properties transform#translateY and transform#scaleY to achieve this effect. For left to right blinds CSS animation, see our blinds-left-to-right effect.

<style> .blinds { /* Uncomment as needed. */ /* width: 100px; */ /* height: 100px; */ /* background-color: deeppink; */ animation-name: blinds; animation-duration: 2s; animation-iteration-count: infinite; animation-timing-function: linear; } @keyframes blinds { 0% { transform: translateY(-50%) scaleY(0.01); } 50% { transform: translateY(-10%) scaleY(.7); } 70% { transform: translateY(5%) scaleY(1); } 100% { transform: translateY(5%) scaleY(1); } } </style>
    Hints:
  • If you cannot see your HTML element when using our code, you may need to set a width and or height, or background on your target HTML element using CSS. Just uncomment the CSS properties in our code as needed.
  • Remove the HTML style tag as needed.
  • Change values in the code such as animation-duration as needed.
Animation effects source code licenced under MIT Licence