overflow:hidden line
来源:互联网 发布:在手机淘宝上开店步骤 编辑:程序博客网 时间:2024/05/16 02:15
1.overflow:hidden的作用是隐藏溢出
比如:
<div style="width:300px;overflow:hidden" id=1><div id=2></div><div>
当ID=2的这个DIV高度设定的宽度超过了300px,那么超出的部分将自动被隐藏
2.line-height指的是在DIV中的元素上下居中
比如用在<li>里,则可以将line-height的高度和height的值相等,(height:30px; line-height:30px;)这样可以让文字在<li>内相对于30px垂直居中。
比如用在<p>内,像这样成段落的,如果不加line-height,行与行之间距离会很近,若在<p>属性内加上line-height:22px;则每行之间的行距都是22px,会显得不会太拥挤.
3.clearfix:after清除浮动
css内容如下:
.clearfix:after{content: ".";display: block;height: 0;clear: both;visibility: hidden;}.clearfix{zoom:1;}/*for ie6*/* html .clearfix {height: 1%;}/* for macIe*/
在html代码如下:
<div style="border:2px solid red;" class="clearfix">
这样就可以实现清除浮动了
<script type="text/javascript"><!--google_ad_client = "ca-pub-1944176156128447";/* cnblogs 首页横幅 */google_ad_slot = "5419468456";google_ad_width = 728;google_ad_height = 90;//--></script><script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
- overflow:hidden line
- overflow:hidden
- overflow:hidden
- overflow:hidden
- overflow:hidden
- overflow:hidden
- overflow:hidden
- overflow:hidden
- overflow:hidden
- overflow:hidden
- overflow: hidden;
- overflow:hidden
- overflow: hidden;
- overflow:hidden
- overflow: hidden;
- 慎用 overflow:hidden
- overflow hidden td
- overflow: hidden IE7无效
- ZZ买衣服 STL
- 2KB内存单片机上实现彩屏GUI控件库
- Android开发中的drawable-(hdpi,mdpi,ldpi)和WVGA,HVGA,QVGA的区别以及联系
- 黑马第二天总结
- Map类型
- overflow:hidden line
- 海康 网络摄像头 多摄像头数据传输及流解码
- SecureCRT 显示中文的方法
- Codeforces 300 C Beautiful Numbers (Locas)
- head 方法比对讲解
- Qt教程一 —— 共十四步
- 工厂方法(Factory Method)之追根究底
- cocos2d实现画笔功能及常用的绘制函数
- Jquery插件珍藏