总结Margin重叠现象
2016-05-17 18:52
387 查看
普通与普通大者取大
float 与 float两者相加
float对普通无影响
总结:普通对普通大者取大;
float与普通无影响;
float与float两者相加
<!DOCTYPE html> <html> <head> <title>box test</title> <style type="text/css"> #box{ width: 200px; height: 200px; background: black; margin-bottom: 50px; } #box1{ width: 300px; height: 100px; background: blue; margin-top: 50px; } </style> </head> <body> <div id="box"></div> <div id="box1"></div> </body> </html>
float 与 float两者相加
<!DOCTYPE html> <html> <head> <title>box test</title> <style type="text/css"> #box{ width: 200px; height: 200px; background: black; margin-bottom: 50px; float: left; } #box1{ width: 1900px; height: 100px; background: blue; margin-top: 50px; float: left; } </style> </head> <body> <div id="box"></div> <div id="box1"></div> </body> </html>
float对普通无影响
<!DOCTYPE html> <html> <head> <title>box test</title> <style type="text/css"> #box{ width: 200px; height: 200px; background: black; margin-bottom: 50px; float: left; } #box1{ width: 300px; height: 100px; background: blue; margin-top: 50px; float: left; } #box2{ background: green; height: 300px; width: 1800px; } </style> </head> <body> <div id="box"></div> <div id="box1"></div> <div id="box2"></div> </body> </html>
总结:普通对普通大者取大;
float与普通无影响;
float与float两者相加
相关文章推荐
- mysq集群原理之Galera replication
- MIME
- hdu 1214 圆桌会议
- UML图
- python 正则
- 为什么我从 Python 转战到 Node.js
- android http——网络请求二次封装的框架设计
- Swift学习笔记(3)iOS 9 中的网络请求
- myEclipse出现:"Building workspace" has encountered a problem
- <div>
- 单例模式
- java中关于线程的小知识
- 学习native过程
- linux 互信不生效
- Java中Math的常用函数
- hook:实现简单的键盘记录器
- 如何解包apk得到里面的源代码
- TP框架数组去重后分页
- notification
- solr5中文分词bug解决