在父类里不包括最后一位子类的margin-bottom
来源:互联网 发布:明星字体软件 编辑:程序博客网 时间:2024/06/05 01:17
<divclass="main">
<divclass="cot">wusuiw</div>
<divclass="cot">cdf</div>
</div>
<style type="text/css"> .cot{ margin-top: 20px; margin-bottom: 30px; } </style>
如图所示:
解答:因为网页的内容是从上而下慢慢堆叠的,margin不扩大父类的内容,所以margin-bottom不在父类里面,解决方法:改为padding-botttom或在父类加overflow:hidden或加设置border值或加float浮动(撑开父类);
阅读全文
0 0
- 在父类里不包括最后一位子类的margin-bottom
- margin-bottom在IE6和IE7下失效的解决办法
- margin-bottom在IE6和IE7下失效的解决办法
- margin-bottom在IE6和IE7下失效的解决办法
- 在CSS中span标签设置padding-top/bottom以及margin-top/bottom无效的解决方法
- DIV内部的最后一个元素的margin-bottom不算高度
- CSS中bottom与margin-bottom的区别
- margin: left right /top bottom的怪异
- IE6关于浮动、margin-bottom的兼容问题
- margin/padding-top/bottom 的百分比
- 关于margin-top/bottom在non-Replaced inline元素上(如span)不起作用的解释
- li margin-bottom在IE6,7中底部3像素的BUG
- 【转】margin-bottom在IE6和IE7下失效的解决办法
- 2.兄弟之间的margin-top 和 margin-bottom 会叠压
- 关于margin-top和margin-bottom的问题
- margin-bottom与bottom不同
- padding-bottom和 margin-bottom
- div的宽度width不包括border和padding、margin!!!!!
- 简单的例子理解依赖注入(PHP)
- 音频降噪
- 括号配对问题
- 创建了对嵌入的互操作程序集间接引用,无法嵌入互操作类型
- Android中的Http通信(一)之Http协议基本知识
- 在父类里不包括最后一位子类的margin-bottom
- jQuery判断复选框是否选中
- [NOIP提高组2002]矩形覆盖
- hdu1280
- Linux设备模型(3)_Uevent
- python包
- ELK实时日志分析平台部署搭建详细实现过程
- Python接口测试之unittest框架(五)
- tp3.1在php5.6+模板不显示或者日志文件很多错误解决办法