web ---- 图片册,按钮

复制代码
<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<style>
			body{
				perspective: 1000px;
			}
			@keyframes myAnimation{
				from{
					transform: rotateX(0deg) rotateY(0deg) rotateZ(0deg);
				}
				to{
					transform: rotateX(360deg) rotateY(360deg) rotateZ(360deg);
				}
			}
			.container{
				margin: 200px;
				position: relative;
				transform-style: preserve-3d;
				transition: 3s;
				animation: myAnimation 5s linear 0s infinite;
			}
			.container:hover>img:first-child{
				left:-300px;
			}
			.container:hover>img:nth-child(2){
				top: -300px;
			}
			.container:hover>img:nth-child(3){
				left: 300px;
			}
			.container:hover>img:nth-child(4){
				top: 300px;
			}
			.container:hover>img:nth-child(5){
				transform: translateZ(-100px);
			}
			.container:hover>img:nth-child(6){
				transform: translateZ(300px);
			}
			.container>img{
				width: 200px;
				height: 200px;
				position: absolute;
				border: 1px solid orange;
				transition: 3s;
			}
			.container>img:first-child{
				left:-200px;
				transform-origin: right;
				transform: rotateY(90deg);
			}
			.container>img:nth-child(2){
				top:-200px;
				transform-origin: bottom;
				transform: rotateX(-90deg);
			}
			.container>img:nth-child(3){
				left:200px;
				transform-origin: left;
				transform: rotateY(-90deg);
			}
			.container>img:nth-child(4){
				top: 200px;
				transform-origin: top;
				transform: rotateX(90deg);
			}
			.container>img:nth-child(6){
				transform: translateZ(200px);
			}
		</style>
	</head>
	<body>
		<div class="container">
			<img src="https://img1.baidu.com/it/u=2559867097,3726275945&fm=253&fmt=auto&app=138&f=JPEG?w=1333&h=500" alt="" />
			<img src="https://img1.baidu.com/it/u=2790304584,1258411054&fm=253&fmt=auto&app=120&f=JPEG?w=1280&h=800" alt="" />
			<img src="https://img1.baidu.com/it/u=7456317,4282812646&fm=253&fmt=auto&app=138&f=JPEG?w=889&h=500" alt="" />
			<img src="https://img1.baidu.com/it/u=1310564963,1641173348&fm=253&fmt=auto&app=120&f=JPEG?w=1280&h=800" alt="" />
			<img src="https://img0.baidu.com/it/u=3993870005,3740828102&fm=253&fmt=auto&app=120&f=JPEG?w=1280&h=800" alt="" />
			<img src="https://img2.baidu.com/it/u=2312383180,3750420672&fm=253&fmt=auto&app=120&f=JPEG?w=1280&h=800" alt="" />
		</div>
	</body>
</html>

鼠标悬停时

相关推荐
AA-代码批发V哥3 小时前
HTML之语义化标签与多媒体标签
html
像风一样自由20203 小时前
HTML与JavaScript:构建动态交互式Web页面的基石
前端·javascript·html
Liudef066 小时前
2048小游戏实现
javascript·css·css3
小桥风满袖9 小时前
Three.js-硬要自学系列38之专项学习缓冲几何体
前端·css·three.js
Hilaku10 小时前
深入CSS层叠的本质:@layer如何优雅地解决样式覆盖与!important滥用问题
前端·css·html
ac.char11 小时前
Golang读取ZIP压缩包并显示Gin静态html网站
golang·html·gin
每天开心11 小时前
深入理解 CSS 选择器:从基础到高级
css·html·ai编程
撰卢12 小时前
如何提高网站加载速度速度
前端·javascript·css·html
sophister12 小时前
Flex 布局中容易踩的那些坑,你踩过几个?
前端·css·html
MiyueFE13 小时前
CSS 函数与混入草案:原生 CSS 的“魔法”即将登场!
前端·css