当前位置:网站首页>【Case】3d navigation
【Case】3d navigation
2022-08-05 16:22:00 【daze girl】
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<style> * {
margin: 0; padding: 0; } ul {
width: 600px; height: 35px; margin: 100px auto; } ul li {
float: left; position: relative; width: 95px; height: 100%; margin-right: 5px; list-style: none; /* 透视效果 */ perspective: 500px; } .box {
width: 100%; height: 100%; /* 为子元素开启3d效果 */ transition: all .7s; transform-style: preserve-3d; } .front, .bottom {
position: absolute; top: 0; left: 0; width: 100%; height: 100%; text-align: center; line-height: 35px; } .front {
background-color: chartreuse; z-index: 1; /* 3. The front box moves forward a box-like distance, Make sure that the center of rotation is at the center of the cube(That is, the position of the screen) */ transform: translateZ(17.5px); } .bottom {
background-color: cornflowerblue; /* 1. 沿xFlip the shaft forward90deg*/ /* 2. Move the box down half the distance */ /* Note that the move must be written first */ transform: translateY(50%) rotateX(-90deg); } ul li:hover .box {
transform: rotateX(90deg); } </style>
</head>
<body>
<ul>
<li>
<div class="box">
<div class="front">前面</div>
<div class="bottom">底面</div>
</div>
</li>
<li>
<div class="box">
<div class="front">前面</div>
<div class="bottom">底面</div>
</div>
</li>
<li>
<div class="box">
<div class="front">前面</div>
<div class="bottom">底面</div>
</div>
</li>
<li>
<div class="box">
<div class="front">前面</div>
<div class="bottom">底面</div>
</div>
</li>
<li>
<div class="box">
<div class="front">前面</div>
<div class="bottom">底面</div>
</div>
</li>
<li>
<div class="box">
<div class="front">前面</div>
<div class="bottom">底面</div>
</div>
</li>
</ul>
</body>
</html>

边栏推荐
猜你喜欢
随机推荐
大厂硬件梦醒时分
解决FileZilla 报错“无法和 SFTP 服务器建立 FTP 连接,请选择合适的协议”
[等价转换]UVa11054 - Wine trading in Gergovia
图像边缘检测——一阶微分算子 Roberts、Sobel、Prewitt、Kirsch、Robinson
突不了围,阿里海外怎么办?
Explain the difference between Oracle DELETE and TRUNCATE
【案例】3d导航
【七夕限定盲盒抽奖】一文带你搞懂盲盒抽奖的页面配置
腾讯将取消部分外包免费食堂福利;iPhone 14 Pro或取消远峰蓝,新增紫色;马斯克:我被推特骗了|极客头条
ASIC和FPGA设计流程
Laplace(拉普拉斯)算子
不堆概念、换个角度聊多线程并发编程
这个「令人上头」的赛道,俞敏洪、高瓴都入了,红杉和腾讯会来吗?
数据库篇——hash索引
【案例】3d相册
“FA都不给我推项目了”
支付系统架构设计详解
SVM 的推导
gpnmb+ gpnmb-的AT2细胞在空转上的映射 mapping----3.2.2seurat版本
微信小程序 实现天气预报接入









