实现项目:用CSS实现蒙德里安名画

1.首先,献上代码和效果图

1.1代码:

<head>
<style>
.centerframe{
display: flex;
height: 100vh;
justify-content: center;
align-items: center;
} .red{
background-color: crimson; }
.blue{
background-color: blue;
}
.yellow{
background-color: yellow;
}
.white{
background-color: white;
}
.box{
width: 50px;
height: 50px;
border-width: 3px;
border-style: solid;
}
.upper{
display: flex;
}
.lower{
display: flex;
}
</style>
</head>
<body>
<div class="centerframe">
<div class="art">
<div class="upper">
<div>
<div style="height: 65;" class="white box"></div>
<div style="height: 70;" class="white box"></div>
</div> <div style="width: 150px;height: 141" class="red box"></div>
</div> <div class="lower">
<div class="blue box"></div>
<div style="width: 110;" class="white box"></div>
<div>
<div style="height: 17;width: 34;" class="white box"></div>
<div style="height: 27;width: 34;" class="yellow box"></div>
</div> </div>
</div>
</div> </body>

1.2效果图:

第一个为整体图:



第二个是网页排布大图:

最新文章

  1. Git bash下中文乱码问题
  2. IOS Core Animation Advanced Techniques的学习笔记(五)
  3. mysql临时表的产生
  4. 总结整理 -- ruby系列
  5. Spring.Net的AOP的通知
  6. 大型网站演化(转载 http://homeway.me/2014/12/10/think-about-distributed-clusters/)
  7. JAVA&#183;多线程:创建线程的两种方式
  8. zoj 2836 容斥原理
  9. 一个PHP开发者总结的九条建议
  10. db2 for linux
  11. 开辟html5和css3学习随笔(2015-3-2)
  12. 理解Load Average做好压力测试
  13. xamarin android 在代码中如何设置文本颜色
  14. HierarchyID 数据类型用法
  15. C语言实现循环队列
  16. pipreqs 组件
  17. tms web core 与 kbmmw 第一次亲密接触
  18. 使用netfilter_queue改包笔记
  19. .NET 的 WCF 和 WebService 有什么区别?(转载)
  20. 如何实现MySQL表数据随机读取?从mysql表中读取随机数据

热门文章

  1. C# 海量数据瞬间插入到数据库的方法
  2. Bug java 安全证书
  3. CSS3全览_最新布局
  4. Missing Private key解决方案——IOS证书 .cer 以p12文件以及配置方案
  5. linux重启后nginx服务无法启动
  6. python lambda表达式应用
  7. Mysql实现定时清空一张表的旧数据并保留几条数据
  8. [从源码学设计]蚂蚁金服SOFARegistry 之 LocalDataServerChangeEvent及数据同步
  9. sql去除重复的几种方法
  10. 深入浅出!阿里P7架构师带你分析ArrayList集合源码,建议是先收藏再看!