<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="keywords" content="关键词关键字">
<meta name="description" content="描述信息">
<title> 3dCity </title>
<style>
*{margin:0;padding:0;}
html,body{
width:100%;height:100%;perspective:1000px; /*距离多远观察*/
background-image:url("粒子.jpg");
background-repeat:no-repeat;
background-size:100% 100%;
}
div,b,i{
position:absolute; /*绝对定位,脱离文档流*/
transform-style:preserve-3d; /*3D视角*/
}
#city{
width:500px;height:500px;border:5px solid lightgray;
background:#ffe5b3;
margin:auto;top:0;left:0;right:0;bottom:0;
transform:rotateX(60deg)rotateZ(-130deg); /*旋转*/
}
#city b{
height:100%; /*继承上一级的高度,即div高度200px*/
transform:rotateX(90deg);
transform-origin:100% 0%; /*旋转中心,X轴占满即在X轴上,Y轴不变*/
}
#city b>b{
/*这里不用填写高度了,他会去他上一级找高度*/
transform:rotateY(90deg);
transform-origin:0% 100%;
}
#city b >b >b{
/*这里不用填写高度了,他会去他上一级找高度*/
transform:rotateY(90deg);
transform-origin:100% 0%;
right:0px;
}
#city b >b >b >b{
/*这里不用填写高度了,他会去他上一级找高度*/
transform:rotateY(90deg);
transform-origin:0% 100%;
left:0px;
}
#city b >b >b >b >i{
display:block; /*变成块级元素*/
background:#e5ccff;
transform-origin:0% 100%; /*Y轴100%,说明在Y轴最顶端*/
transform:rotateX(-90deg);
bottom:1px; /*房顶下去一点*/
}
#city .build b{
/*背景颜色,背景图片,以及图片大小*/
background:#368;
background-image:url("images/窗户.jpg");
background-size:10px 10px;
border:1px solid white;
}
</style>
</head>
<body>
<!--地皮-->
<div id="city">
<!--一栋楼-->
<div class="build" style="height:200px; top:40px;left:10px;"> <!--每栋楼坐标不同-->
<b style="width:40px;">
<b style="width:30px">
<b style="width:40px;">
<b style="width:30px">
<i style="width:30px;height:40px"></i>
</b>
</b>
</b>
</b>
</div>
<!--一栋楼-->
<div class="build" style="height:150px; top:40px;left:130px;"> <!--每栋楼坐标不同-->
<b style="width:80px;">
<b style="width:40px">
<b style="width:80px;">
<b style="width:40px">
<i style="width:40px;height:80px"></i>
</b>
</b>
</b>
</b>
</div>
<!--一栋楼-->
<div class="build" style="height:180px; top:30px;left:280px;"> <!--每栋楼坐标不同-->
<b style="width:50px;">
<b style="width:30px">
<b style="width:50px;">
<b style="width:30px">
<i style="width:30px;height:50px"></i>
</b>
</b>
</b>
</b>
</div>
<!--一栋楼-->
<div class="build" style="height:180px; top:230px;left:380px;"> <!--每栋楼坐标不同-->
<b style="width:30px;">
<b style="width:70px">
<b style="width:30px;">
<b style="width:70px">
<i style="width:70px;height:30px"></i>
</b>
</b>
</b>
</b>
</div>
<!--一栋楼-->
<div class="build" style="height:180px; top:280px;left:30px;"> <!--每栋楼坐标不同-->
<b style="width:40px;">
<b style="width:30px">
<b style="width:40px;">
<b style="width:30px">
<i style="width:30px;height:40px"></i>
</b>
</b>
</b>
</b>
</div>
<!--一栋楼-->
<div class="build" style="height:180px; top:230px;left:130px;"> <!--每栋楼坐标不同-->
<b style="width:50px;">
<b style="width:30px">
<b style="width:50px;">
<b style="width:30px">
<i style="width:30px;height:50px"></i>
</b>
</b>
</b>
</b>
</div>

</div>
</body>
</html>

效果:

最新文章

  1. AD域内DNS服务器如何解析公网域名
  2. Git 命令清单
  3. C#中快速释放内存,任务管理器可查证
  4. Unity游戏开发之“屏幕截图”
  5. CodeForces152C——Pocket Book(排列组合问题)
  6. [转载]MongoDB学习(二):数据类型和基本概念
  7. asp.net中生成缩略图并添加版权实例代码
  8. shell用if
  9. Android常用Permission
  10. VR全景智慧城市—你的掌上步行街
  11. mvc中传入字典的模型项的类型问题
  12. LeetCode之“动态规划”:Climbing Stairs
  13. 去除 ServiceStack.Redis 的6000次限制。
  14. Spring AOP实战例子与springmvc整合不起效果的解决办法
  15. MySQL中的isnull、ifnull和nullif函数用法
  16. JAVA获取apk包的package和launchable-activity名称(完善成EXE版)
  17. extern &quot;C&quot; 的用意
  18. 监控cpu、内存 &lt;shell&gt;
  19. 【死磕Java并发】-----深入分析synchronized的实现原理
  20. 学习python第二天数据库day1

热门文章

  1. 手机抓包app在python中使用
  2. Fluent算例精选|03利用VOF和蒸发-冷凝模型
  3. 数据库表结构查询SQL
  4. Multi-batch TMT reveals false positives, batch effects and missing values(解读人:胡丹丹)
  5. 【攻防世界】simple-unpack
  6. 常用的API和基础算法
  7. drf 权限认证
  8. Aleax prize (开放域聊天系统比赛)2018冠军论文阅读笔记
  9. C#获取设备话筒主峰值(实时音频输出分贝量)
  10. 使用sklearn做单机特征工程(Performing Feature Engineering Using sklearn)