You may have seen a lot of blinds made using jquery online, can we use pure CSS to do this work? The answer is yes. Not only can we produce this shutter effect, but it also makes it responsive.
Online preview Source Download
HTML structure is the key to making a pure CSS shutter effect. In the HTML structure, you need to use multiple images of the same image to organize a "shutter". In our demo, we make 10 shutters, need 10 identical , and place them in a <figure> tag. We also need 10 other images to be placed on the opposite side of the blinds. Each set of pictures has a different class, the code is as follows:
< FigureID= "Blinds"> <imgsrc= "Autumn-face.jpg"Alt class= "First"> <imgsrc= "Autumn-face.jpg"Alt class= "First">... ..<imgsrc= "Autumn-face.jpg"Alt class= "First"> <imgsrc= "Julia.jpg"Alt class= "Second"> <imgsrc= "Julia.jpg"Alt class= "Second">... ..<imgsrc= "Julia.jpg"Alt class= "Second"></ Figure>
At this point, all the shutters will be rotated at the same time. To make the "pulsation" effect of the blinds, you can set a delay time for each slice's transition.
#blinds Img:nth-child (1), #blinds Img:nth-child (one) { clip:rect (0px, 100px, 840px, 0px); transform-origin:50px 0px; } #blinds Img:nth-child (2), #blinds img:nth-child { clip:rect (0px, 200px, 840px, 100px); transform-origin:150px 0px; transition-delay:100ms; } #blinds Img:nth-child (3), #blinds img:nth-child { clip:rect (0px, 300px, 840px, 200px); transform-origin:250px 0px; transition-delay:200ms; } ... #blinds img:nth-child (10n) { clip:rect (0px, 1000px, 840px, 900px); transform-origin:950px 0px; transition-delay:900ms; }
One of the biggest benefits of using the Clip property is that it has a naturally responsive effect: if the picture is scaled down, all slices will be reduced accordingly. Check the demo to try to narrow your browser, when the browser width is less than 500 pixels, the picture blinds only 5 slices.
via:http://www.w2bc.com/article/25379
Based on CSS3 3D shutter image transition effect