<!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
CSS3 三维立体文字及旋转特效
最新推荐文章于 2024-08-14 18:07:55 发布
本文展示了如何使用CSS3创建三维立体的文字效果,并通过JavaScript实现鼠标交互时的文字旋转。通过堆叠多个层并应用不同的translateZ偏移,达到立体感,同时在鼠标移动和点击时调整旋转角度,增强视觉效果。
摘要由CSDN通过智能技术生成