前端 三维空间笔记

<!DOCTYPE html>

<html>

<head>

<!-- 考点2D旋转,位移,缩放,倾斜和3D -->

<meta charset="utf-8" />

<title>三维</title>

<style type="text/css">

body{

/* 透视 */

perspective: 1000px;

perspective-origin: 50% 50%;

}

div{

width: 400px;

height: 400px;

}

.box1{

margin: 200px auto; /* 考点水平居中 */

background-color: aqua;

transform-style: preserve-3d; /* 给盒子开启3D空间效果 */

background-color:rgba(0,255,255,0.4);

}

.box2{

background-color: deeppink;

transform: rotateX(45deg);

}

</style>

</head>

<body>

<div class="box1">

<div class="box2">

</div>

</div>

</body>

</html>

相关推荐
Serendipity_Carl1 天前
Django入门-小白教程
后端·python·pycharm·django·html5
ヤ鬧鬧o.3 天前
IDE风格的布局界面
javascript·html5
qq_406176143 天前
什么是模块化
开发语言·前端·javascript·ajax·html5
HIT_Weston3 天前
85、【Ubuntu】【Hugo】搭建私人博客:文章目录(四)
linux·ubuntu·html5
谷哥的小弟3 天前
HTML5新手练习项目—新年祝福(附源码)
前端·源码·html5·项目
MoonPointer-Byte4 天前
[特殊字符]The Omniscient Tome | 全知之书
javascript·html5
行思理4 天前
css 样式新手教程
前端·css·html5
空白4 天前
自学HTML5+CSS3丨第三天丨详解SEO
前端·css3·html5
xun_li_4 天前
2024---2025年前端开发的就业现状及前景
css·html·css3·html5
打工人小夏4 天前
前端面试题
前端·css·前端框架·vue·html·es6·html5