当前位置:网站首页>Flop effect
Flop effect
2022-04-23 14:16:00 【Ruirui junior】
<!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>
版权声明
本文为[Ruirui junior]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204231408339301.html
边栏推荐
猜你喜欢
剑指offer刷题(1)--面向华为
About the configuration and use of json5 in nodejs
01-nio basic ByteBuffer and filechannel
HyperBDR云容灾V3.2.1版本发布|支持更多云平台,新增监控告警功能
Operation instructions of star boundary automatic text translator (advanced version)
01-NIO基础之ByteBuffer和FileChannel
win10自带Groove音乐不能播放CUE和APE文件的一种曲线救国办法,自己创建aimppack插件包,AIMP安装DSP插件
HyperMotion云迁移助力中国联通,青云完成某央企上云项目,加速该集团核心业务系统上云进程
RecyclerView细节研究-RecyclerView点击错位问题的探讨与修复
VMWare安装64位XP中文教程
随机推荐
困扰多年的系统调研问题有自动化采集工具了,还是开源免费的
关于NodeJS中JSON5的相关配置和使用
Visio installation error 1:1935 2: {XXXXXXXX
mysql锁数据库锁
星界边境文本自动翻译机使用说明
How does void * exist?
进入新公司,运维工程师从下面这几项了解系统的部署
On September 8, the night before going to Songshan Lake
Quickly understand the three ways of thread implementation
mysql 5.1升级到5.610
Request module
关于训练过程中损失函数出现断崖式增长的问题
mysql查询库大小
線程組ThreadGroup使用介紹+自定義線程工廠類實現ThreadFactory接口
RecyclerView高级使用(一)-侧滑删除的简单实现
Recyclerview advanced use (I) - simple implementation of sideslip deletion
Introduction to the use of countdownlatch and cyclicbarrier for inter thread control
操作系统常见面试题目:
网页自适应,等比缩放
JDBC和servlet写CRUD的接口总结