宝石旋转.html

本文介绍了如何使用CSS3来实现宝石的3D旋转效果,详细解析了相关CSS属性的使用,包括transform、animation等,帮助读者理解并掌握动态展示宝石的方法。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

宝石旋转.html

<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>宝石旋转</title>
<style type="text/css">
	*{
		margin: 0;
		padding: 0;
		list-style: none;
	}
	div{
		width: 592px;
		height: 534px;
		position: relative;
		background: url("../1images第8章素材/images/mofa.png") no-repeat;
	}
	.waihuan{
		display: inline-block;
		width: 503px;
		height: 477px;
		background: url("../1images第8章素材/images/waihuan.png") no-repeat;
		position: absolute;
		left: 8%;
		top:7%;
		animation: xuanzhuan1 10s linear 0s infinite;	
	}
	@keyframes xuanzhuan1{
		from{
			transform: rotate(0);
		}
		to{
			transform: rotate(360deg);
		}
	}
	.neihuan{
		display: inline-block;
		width: 274px;
		height: 274px;
		background: url("../1images第8章素材/images/neihuan.png") no-repeat;
		position: absolute;
		left: 27%;
		top:25%;
		animation: xuanzhuan2 30s linear 0s infinite;	
	}
	@keyframes xuanzhuan2{
	from{
			transform: rotate(360deg);
		}
		to{
			transform: rotate(0);
		}
	}
	.shitou{
		display: inline-block;
		width: 142px;
		height: 220px;
		background: url("../1images第8章素材/images/shitou.png") no-repeat;
		position: absolute;
		left: 45%;
		top:42%;
		animation: fangda 1s linear 0s infinite alternate;	
	}
	@keyframes fangda{
	from{
			transform:scale(1);
		}
		to{
			transform: scale(1.03);
		}
	}
	.guang{
		display: inline-block;
		width: 1px;
		height: 1px;
		border-radius: 50%;
		position: absolute;
		left: 50%;
		top:50%;
		animation: faguang 1s linear 0s infinite alternate;	
	}
	@keyframes faguang{
	from{
			box-shadow: 0px 0px 30px 30px #ff6c00;
		}
		to{
			box-shadow: 0px 0px 60px 60px #feb002;
		}
	}
	
</style>
</head>

<body>
	
	<div>
		<span class="waihuan"></span>
		<span class="neihuan"></span>
		<span class="shitou"></span>
		<span class="guang"></span>
	</div>
</body>
</html>

在这里插入图片描述

评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

小阴学习吧

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值