当前位置:网站首页>翻牌效果
翻牌效果
2022-04-23 14:09:00 【瑞瑞小同学】
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title></title>
<style>
/* div{
position: relative;
margin: 100px auto;
width: 224px;
height: 224px;
}
div img{
position: absolute;
left: 0;
top: 0;
transition: all 2s;
}
div img:first-child{
z-index: 1;
backface-visibility: hidden;
}
div:hover img{
transform: rotateY(180deg);
} */
/* Classes that will show or hide the
three back faces of the "cube" */
.showbf div {
backface-visibility: visible;
}
.hidebf div {
backface-visibility: hidden;
}
/* Define the container div, the cube div, and a generic face */
.container {
width: 150px;
height: 150px;
margin: 75px 0 0 75px;
border: none;
}
.cube {
width: 100%;
height: 100%;
perspective: 550px;
perspective-origin: 150% 150%;
transform-style: preserve-3d;
}
.face {
display: block;
position: absolute;
width: 100px;
height: 100px;
border: none;
line-height: 100px;
font-family: sans-serif;
font-size: 60px;
color: white;
text-align: center;
}
/* Define each face based on direction */
.front {
background: rgba(0, 0, 0, 0.3);
transform: translateZ(50px);
}
.back {
background: rgba(0, 255, 0, 1);
color: black;
transform: rotateY(180deg) translateZ(50px);
}
.right {
background: rgba(196, 0, 0, 0.7);
transform: rotateY(90deg) translateZ(50px);
}
.left {
background: rgba(0, 0, 196, 0.7);
transform: rotateY(-90deg) translateZ(50px);
}
.top {
background: rgba(196, 196, 0, 0.7);
transform: rotateX(90deg) translateZ(50px);
}
.bottom {
background: rgba(196, 0, 196, 0.7);
transform: rotateX(-90deg) translateZ(50px);
}
/* Make the table a little nicer */
th, p, td {
background-color: #EEEEEE;
margin: 0px;
padding: 6px;
font-family: sans-serif;
text-align: left;
}
</style>
</head>
<body>
<!-- <div>
<img class="a" src="img/35.jpg" alt="">
<img class="b" src="img/36.jpg" alt="">
</div> -->
<table>
<tr>
<th><code>backface-visibility: visible;</code></th>
<th><code>backface-visibility: hidden;</code></th>
</tr>
<tr>
<td>
<div class="container">
<div class="cube showbf">
<div class="face front">1</div>
<div class="face back">2</div>
<div class="face right">3</div>
<div class="face left">4</div>
<div class="face top">5</div>
<div class="face bottom">6</div>
</div>
</div>
<p>
Since all faces are partially transparent,
the back faces (2, 4, 5) are visible
through the front faces (1, 3, 6).
</p>
</td>
<td>
<div class="container">
<div class="cube hidebf">
<div class="face front">1</div>
<div class="face back">2</div>
<div class="face right">3</div>
<div class="face left">4</div>
<div class="face top">5</div>
<div class="face bottom">6</div>
</div>
</div>
<p>
The three back faces (2, 4, 5) are
hidden.
</p>
</td>
</tr>
</table>
</body>
</html>
版权声明
本文为[瑞瑞小同学]所创,转载请带上原文链接,感谢
https://blog.csdn.net/yr123456654321/article/details/111599373
边栏推荐
- Pass in external parameters to the main function in clion
- Wechat applet communicates with esp8266 based on UDP protocol
- STD:: map and STD:: vector memory free
- Algorithem_ReverseLinkedList
- Use the executors class to quickly create a thread pool
- Operation instructions of star boundary automatic text translator (advanced version)
- 文字组合,不重复,做搜索或查询关键字匹配
- HyperMotion云迁移完成阿里云专有云产品生态集成认证
- About the configuration and use of json5 in nodejs
- 教育行业云迁移最佳实践:海云捷迅使用HyperMotion云迁移产品为北京某大学实施渐进式迁移,成功率100%
猜你喜欢

MYSQL一种分表实现方案及InnoDB、MyISAM、MRG_MYISAM等各种引擎应用场景介绍

Postman的安装使用及填坑心得

Wechat applet positioning and ranging through low-power Bluetooth device (2)

HyperBDR云容灾V3.2.1版本发布|支持更多云平台,新增监控告警功能

Research on recyclerview details - Discussion and repair of recyclerview click dislocation

剑指offer刷题(2)--面向华为

帆软中单元格中隔行变色以及数量大于100字体变大变红设置

关于云容灾,你需要知道这些

On the multi-level certificate based on OpenSSL, the issuance and management of multi-level Ca, and two-way authentication

进入新公司,运维工程师从下面这几项了解系统的部署
随机推荐
01-nio basic ByteBuffer and filechannel
jsp学习1
统信UOS卸载php7.2.24,安装php7.4.27 ;卸载再安装为PHP 7.2.34
帆软实现分页时第一行和最后两行冻结方式
帆软中使用if else 进行判断-使用标题条件进行判断
Wechat applet communicates with low-power Bluetooth - receives data sent by hardware (IV)
拨开云雾synchronized使用五种方式介绍
微信小程序客服接入,实现发送和接收消息
Multiple inheritance virtual base exercises
字节面试编程题:最小的K个数
RecyclerView高级使用(二)-垂直拖拽排序的简单实现
ActiveMq基础知识
云容灾是什么意思?云容灾和传统容灾的区别?
帆软报表设置单元格填报以及根据值的大小进行排名方法
利用json-server在本地创建服务器请求
VMware installation 64 bit XP Chinese tutorial
MYSQL一种分表实现方案及InnoDB、MyISAM、MRG_MYISAM等各种引擎应用场景介绍
DP energy Necklace
Jira截取全图
Essential difference between restful WebService and gSOAP webservice