1 Star 0 Fork 0

YunSmiling/gitee-demo03

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
test.html 2.68 KB
一键复制 编辑 原始数据 按行查看 历史
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<style>
* {
margin: 0;
padding: 0;
}
img {
vertical-align: bottom;
}
li {
list-style: none;
}
body {
/* 透视属性 */
perspective: 800px;
background: url(./images/guide-bg2.jpg) no-repeat;
background-size: 100% 100%;
}
.box {
width: 1200px;
height: 420px;
/* border:1px solid red; */
margin: 200px auto;
box-sizing: border-box;
position: relative;
}
.box ul {
height: 380px;
}
.box ul li {
width: 200px;
height: 380px;
}
.box ul li {
position: absolute;
}
.box ul li:nth-child(1) {
left: 0;
}
.box ul li:nth-child(2) {
left: 20%;
top: 50px;
}
.box ul li:nth-child(3) {
left: 40%;
}
.box ul li:nth-child(4) {
left: 60%;
top: 50px;
}
.box ul li:nth-child(5) {
left: 80%;
}
.box ul li img {
position: absolute;
}
.box ul li img.front {
/* 过渡属性 */
transition: transform 1s;
z-index: 1000;
}
.box ul li img.back {
transition: transform 1s;
transform: rotateY(-180deg);
}
.box ul li:hover .front {
transform: rotateY(180deg);
backface-visibility: hidden;
}
.box ul li:hover .back {
transform: rotateY(0deg);
}
</style>
</head>
<body>
<div class="box">
<ul>
<li>
<img src="images/card6-back.png" class="back" />
<img src="images/card6.png" class="front" />
</li>
<li>
<img src="images/card7.png" class="front" /><img src="images/card7-back.png" class="back" />
</li>
<li>
<img src="images/card8.png" class="front" /><img src="images/card8-back.png" class="back" />
</li>
<li>
<img src="images/card9.png" class="front" /><img src="images/card9-back.png" class="back" />
</li>
<li>
<img src="images/card10.png" class="front" /><img src="images/card10-back.png" class="back" />
</li>
</ul>
</div>
</body>
</html>
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/zhaoqing3325328807/gitee-demo03.git
[email protected]:zhaoqing3325328807/gitee-demo03.git
zhaoqing3325328807
gitee-demo03
gitee-demo03
master

搜索帮助