当前位置:网站首页>学习探索-3d轮播卡片
学习探索-3d轮播卡片
2022-07-25 23:15:00 【miao_zz】
效果示例图


代码示例
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>3d轮播卡片</title>
<style type="text/css">
* {
padding: 0;
margin: 0;
box-sizing: border-box;
}
.card-container {
width: 150px;
height: 75px;
margin: 60px auto;
position: relative;
perspective: 300px;
}
.card-wrap {
position: absolute;
width: 100%;
height: 100%;
transform-style: preserve-3d;
transform: rotateY(0deg) translateZ(-150px);
animation: scroll 10s cubic-bezier(0.77, 0, 0.2, 1) infinite;
}
.card-item {
width: 100%;
height: 100%;
position: absolute;
/* 添加倒影 */
-webkit-box-reflect: below 15px -webkit-linear-gradient(transparent 50%, rgba(255, 255, 255, 0.5));
}
.card-item:nth-of-type(1) {
transform: rotateY(0deg) translateZ(150px);
}
.card-item:nth-of-type(2) {
transform: rotateY(72deg) translateZ(150px);
}
.card-item:nth-of-type(3) {
transform: rotateY(144deg) translateZ(150px);
}
.card-item:nth-of-type(4) {
transform: rotateY(216deg) translateZ(150px);
}
.card-item:nth-of-type(5) {
transform: rotateY(288deg) translateZ(150px);
}
@keyframes scroll {
0% {
transform: translateZ(-150px) rotateY(0deg);
}
20% {
transform: translateZ(-150px) rotateY(-72deg);
}
40% {
transform: translateZ(-150px) rotateY(-144deg);
}
60% {
transform: translateZ(-150px) rotateY(-216deg);
}
80% {
transform: translateZ(-150px) rotateY(-288deg);
}
100% {
transform: translateZ(-150px) rotateY(-360deg);
}
}
</style>
</head>
<body>
<div class="card-container">
<div class="card-wrap">
<img class="card-item" src="img/1.jpg" />
<img class="card-item" src="img/2.jpg" />
<img class="card-item" src="img/3.jpg" />
<img class="card-item" src="img/4.jpg" />
<img class="card-item" src="img/5.jpg" />
</div>
</div>
</body>
</html>
边栏推荐
- firewall 命令简单操作
- Anaconda installation tutorial environment variables (how to configure environment variables)
- 7-1 understand everything
- IPFs of Internet Protocol
- 5 ROS仿真建模(3- rviz+gazebo+控制仿真机器人)
- Secure code warrior learning record (IV)
- uvm_ HDL -- implementation of DPI in UVM (4)
- Cuteone: a onedrive multi network disk mounting program / with member / synchronization and other functions
- Panzer_ Jack's personal blog founding day
- npm+模块加载机制
猜你喜欢

@Import

向下扎根,向上生长,探寻华为云AI的“根”力量

类和对象(2)(6个默认成员函数)

Apple CMS V10 template /mxone Pro adaptive film and television website template

Details of notification (status bar notification)

5 ROS simulation modeling (3-rviz+gazebo+ control simulation robot)

WordPress removes the website publishing time

Dynamic memory management

Secure code warrior learning record (IV)

MVVM model
随机推荐
Design of Butterworth filter and drawing of amplitude frequency characteristic curve
连续三年成为云AI服务领导者,亚马逊云科技做对了什么?
Analysis of the influence of ESM direction finding error on positioning error
第二周学习:卷积神经网络
Network Security Learning notes-1 file upload
idea设置get、set模板解决boolean类型字段的命名问题
QT add mouse event to control
Hj9 extract non duplicate integers
Explain in detail the addition (+) operation in JS, basic data type addition, reference data type addition, and the underlying operation rules, [] + {}, {} + []
Expression of directional signal -- complex exponential signal
The difference between MySQL clustered index and non clustered index
uvm_hdl——DPI在UVM中的实现(四)
Dynamic memory management
Learning notes of technical art hundred people plan (2) -- vector
@Autowired注解 required属性
MES系统设备管理概述(下)
Tencent map API request source is not authorized, this request source domain name
Single model common sense reasoning first surpasses human beings! HFL summit openbookqa challenge
推荐系统——An Embedding Learning Framework for Numerical Features in CTR Prediction
Longitude and latitude and its transformation with coordinate system