CSS3 三维立体文字及旋转特效

本文展示了如何使用CSS3创建三维立体的文字效果,并通过JavaScript实现鼠标交互时的文字旋转。通过堆叠多个层并应用不同的translateZ偏移,达到立体感,同时在鼠标移动和点击时调整旋转角度,增强视觉效果。
摘要由CSDN通过智能技术生成
<!DOCTYPE html>
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
	<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no" />
	<style type=text/css>
		body{
			background-color:#666666;
		}
		.land{
			margin:0px;
			padding:0px;
			font-size:150px;
			font-family:"微软雅黑";
			width:200px;
			height:250px;
			background-color:#888888;
			transform-style:preserve-3d;
			transform:perspective(1000px) rotateX(60deg) rotateZ(30deg);			
		}
		.centered{
			margin-left:auto;
			margin-right:auto;
		}
		.floor{
			position:absolute;
			top:25px;
			left:25px;
			width:150px;
			height:150px;
			padding:0px;
			transform-style:preserve-3d;			
			color:#cccccc;			
		}
		//堆叠10个层形成类似拉伸成立体的效果
		.floor0{
			transform:perspective(1000px) translateX(0
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值