前端 三维空间笔记

<!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>

相关推荐
开发者小天1 天前
React中useCallback的使用
前端·javascript·react.js·typescript·前端框架·css3·html5
软件开发技术深度爱好者2 天前
轻量级数学符号点击复制工具HTML版
javascript·html5
一晌小贪欢3 天前
【圣诞快乐 Merry Christmas】 3D 粒子变形圣诞体验
3d·html·h5·html5·圣诞网页·粒子虚幻·虚幻粒子页面
旧梦吟3 天前
脚本工具 批量md转html
前端·python·html5
旧梦吟4 天前
脚本网页 C与汇编详解
c语言·css3·html5
旧梦吟4 天前
脚本网页 linux内核源码讲解
linux·前端·stm32·算法·html5
相闻秋歌6 天前
六、背景相关属性
css·html5
相闻秋歌6 天前
五、选择器进阶
html5
小北方城市网6 天前
第2课:零基础前端框架实操入门——从核心语法到第一个完整项目
javascript·ai·正则表达式·json·html5
旧梦吟7 天前
脚本网页 三人四字棋
前端·数据库·算法·css3·html5