Based on CSS3 3D shutter image transition effect

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.