CSS设置精选版(高级应用)

1、设置元素最大|最小高度:{max-height:200px;|min-height:20px;}

 

2、内联:{display:inline}

 

3、对于IE6不同于其他浏览器的特殊设置,可以使用{* html p:**}

 

4、使表格元素不可见(非ie浏览器):tr.coll { visibility:collapse }

 

5、改变光标{cursor:auto},值举例(将鼠标移到样式上):

Auto
Crosshair
Default
Pointer
Move
e-resize
ne-resize
nw-resize
n-resize
se-resize
sw-resize
s-resize
w-resize
text
wait
help

 

6、a标签的几个状态定义顺序:

a:hover 必须位于 a:link 和 a:visited,a:active 必须位于 a:hover之后

 

7、定义某个有classname的a标签的link:a.one:link{},html格式:<a class="one"...></a>

 

8、给指定元素在页面上出现的第一次定义样式(不支持IE)。

     8.1 css:[p:first-child {font-weight: bold;}]

           html:[<p>These are the necessary steps:</p>]

           说明:在html中的第一个P标签为粗体。

     8.2 css:[p > li:first-child]

           说明:匹配所有p标签中的第一个li

     8.3 css:[p:first-child li]

           说明:第一个p标签下的所有li

 

9、给指定元素中的第一个单词或字定义样式: :first-letter

     说明:支持的属性有:    font、color、background、margin、padding、border、text-decoration、vertical-align、text-transform、line-height、float、clear

 

10、修饰某元素的第一行: :first-line

       说明:first-line只可以修饰块级元素,支持的属性有:    font、color、background、word-spacing、letter-spacing、text-decoration、vertical-align、text-transform、line-height、clear

 

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值