Share this dazzling three-dimensional photo album, I hope everyone likes it!
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>三维动画</title> <style type="text/css"> * { padding : 0px; margin: 0px; } body { background: url(images/758.jpg) no-repeat top center; } .product { height: 400px; position: fixed; top: 20%; right: 20%; /*视距*/ perspective : 500px; } .scene { height: 250px; width: 250px; transform-style: preserve-3d; transform-origin: 50%; margin: 100px; /*定义一个名为slide的动画*/ animation: slide 12s linear infinite; } .scene ul li { width: 230px; height: 230px; list-style: none; border: 5px solid rgba(255, 255, 255, 0.5); position: absolute; } @keyframes slide{ from{ transform: rotateY(0deg); } to{ transform: rotateY(360deg); } } .s1 { float: left; } .s1 ul li:nth-child(1) { transform: rotateY(0deg) translateZ(118px); } .s1 ul li:nth-child(2) { transform: rotateY(90deg) translateZ(118px); } .s1 ul li:nth-child(3) { transform: rotateY(180deg) translateZ(118px); } .s1 ul li:nth-child(4) { transform: rotateY(-90deg) translateZ(118px); } .s2 { float: right; } .s2 ul li:nth-child(1) { transform: rotateY(0deg) translateZ(200px); } .s2 ul li:nth-child(2) { transform: rotateY(90deg) translateZ(200px); } .s2 ul li:nth-child(3) { transform: rotateY(180deg) translateZ(200px); } .s2 ul li:nth-child(4) { transform: rotateY(-90deg) translateZ(200px); } </style> </head> <body> <p class='product'> <!-- scene类是为了修饰两个p的相同点 --> <!-- s1和s2是为了显示两个p的不同,一个左浮动,一个右浮动 --> <p class='scene s1'> <ul> <li><img src="/static/imghwm/default1.png" data-src="images/1.jpg" class="lazy" / alt="Example of creating a cool three-dimensional photo album with CSS3" ></li> <li><img src="/static/imghwm/default1.png" data-src="images/2.jpg" class="lazy" / alt="Example of creating a cool three-dimensional photo album with CSS3" ></li> <li><img src="/static/imghwm/default1.png" data-src="images/3.jpg" class="lazy" / alt="Example of creating a cool three-dimensional photo album with CSS3" ></li> <li><img src="/static/imghwm/default1.png" data-src="images/4.jpg" class="lazy" / alt="Example of creating a cool three-dimensional photo album with CSS3" ></li> </ul> </p> <p class='scene s2'> <ul> <li><img src="/static/imghwm/default1.png" data-src="images/1.jpg" class="lazy" / alt="Example of creating a cool three-dimensional photo album with CSS3" ></li> <li><img src="/static/imghwm/default1.png" data-src="images/2.jpg" class="lazy" / alt="Example of creating a cool three-dimensional photo album with CSS3" ></li> <li><img src="/static/imghwm/default1.png" data-src="images/3.jpg" class="lazy" / alt="Example of creating a cool three-dimensional photo album with CSS3" ></li> <li><img src="/static/imghwm/default1.png" data-src="images/4.jpg" class="lazy" / alt="Example of creating a cool three-dimensional photo album with CSS3" ></li> </ul> </p> </p> </body> </html>
The following is a screenshot:
The above is the detailed content of Example of creating a cool three-dimensional photo album with CSS3. For more information, please follow other related articles on the PHP Chinese website!

CSS Grid is a powerful tool for creating complex, responsive web layouts. It simplifies design, improves accessibility, and offers more control than older methods.

Article discusses CSS Flexbox, a layout method for efficient alignment and distribution of space in responsive designs. It explains Flexbox usage, compares it with CSS Grid, and details browser support.

The article discusses techniques for creating responsive websites using CSS, including viewport meta tags, flexible grids, fluid media, media queries, and relative units. It also covers using CSS Grid and Flexbox together and recommends CSS framework

The article discusses the CSS box-sizing property, which controls how element dimensions are calculated. It explains values like content-box, border-box, and padding-box, and their impact on layout design and form alignment.

Article discusses creating animations using CSS, key properties, and combining with JavaScript. Main issue is browser compatibility.

Article discusses using CSS for 3D transformations, key properties, browser compatibility, and performance considerations for web projects.(Character count: 159)

The article discusses using CSS gradients (linear, radial, repeating) to enhance website visuals, adding depth, focus, and modern aesthetics.

Article discusses pseudo-elements in CSS, their use in enhancing HTML styling, and differences from pseudo-classes. Provides practical examples.


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Dreamweaver CS6
Visual web development tools

EditPlus Chinese cracked version
Small size, syntax highlighting, does not support code prompt function

WebStorm Mac version
Useful JavaScript development tools

ZendStudio 13.5.1 Mac
Powerful PHP integrated development environment
