Based on CSS3 3D shutter image transition effect, css33d shutter transition

Source: Internet
Author: User

Based on CSS3 3D shutter image transition effect, css33d shutter transition

You may have seen a lot of blinds made using jQuery on the Internet. Can we use pure CSS to do this? The answer is yes. We can not only make this Louver effect, but also make it responsive.

Download Online Preview source code

HTML structure is the key to making pure CSS blinds. In the html structure, multiple identical images must be used to organize a "Shutter ". In our demo, we need 10 identical blinds to place them in a <figure> label. At the same time, we need 10 other images to be placed on the opposite side of the blinds. Set different classes for each group of images. The Code is as follows:

<figure id="blinds">            …                …    </figure>   

At this time, all shutter slices will be rotated at the same time. You can set a delay time for the transition of each slice to make the "pulsation" effect of the shutter.

#blinds img:nth-child(1), #blinds img:nth-child(11) {    clip: rect(0px, 100px, 840px, 0px);    transform-origin: 50px 0px; }#blinds img:nth-child(2), #blinds img:nth-child(12) {    clip: rect(0px, 200px, 840px, 100px);    transform-origin: 150px 0px;    transition-delay: 100ms; }#blinds img:nth-child(3), #blinds img:nth-child(13) {    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 advantages of using the clip attribute is that it naturally has a responsive effect: if the image is reduced, all slices will be reduced accordingly. View the demo and try to narrow down your browser. When the browser width is less than 500 pixels, there are only five slices in the picture blinds.

Via: http://www.w2bc.com/Article/25379

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.