首页 > Web开发 > 详细

css基础知识

时间:2015-04-28 11:19:29      阅读:273      评论:0      收藏:0      [点我收藏+]

1、用css实现段落前面缩进两个字

   text-indent: 2em; /*em是相对单位,2em即现在一个字大小的两倍*/

2、用css实现水平虚线的两种方法

   <hr size="1" noshade="noshade" style="border:1px #cccccc dotted;"/>

   <div style="border-top:1px dashed #ccccccc;height:1px;overflow:hidden;"></div>

3、css简单重叠线效果

    样式*{padding:0;margin:0;}

         .line{width:100%;height:30px;line-height:30px;border-bottom:2px grey solid;}

         h3{width:30%;height:30px;line-height:30px;border-bottom:2px green solid;display:inline-block;*zoom:1;*display:inline;margin-bottom:-2px;}

 <div class="line">

   <h3>天之蓝,梦之绿</h3>

</div>

css基础知识

原文:http://www.cnblogs.com/lissa/p/4462381.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!