网页制作DIV+CSS工作心得体会 |
|
|
三、CSS样式 1、CSS权重(优先级) <div class="case1" id="case2" style="cloor:red"></div> <style> .case2{样式内容} #case2{样式内容} </style> 以上为例:权重最高的是 style="cloor:red",然后是ID="case2" 最后是class。 首先权重最高的是页面style样式。然后是ID优先级要高于 CLASS 。 ID是唯一的。 CLASS一个页面可以出现很多个,最后是全局的样式。(这一点很重要) 2、CSS样式重定义 /*CSS样式重定义开始*/论文联盟http://wWw.LWlM.cOM body{ font-size:12px; font-family: Arial, Helvetica, sans-serif;padding:0; margin:0; color:#666666; background:#fff;} div,form,ul,dd,dl,ol,dt,li,p{list-style:none;padding:0; margin:0;} h1,h2,h3,h4,h5,h6{font-size:100%; margin:0; padding:0;} img { border:none; } .none{ display:none;} a{ text-decoration:none; color:#444; cursor:pointer;} a:hover{ color:#FF0000; text-decoration: none;} .clear { width:0; height:0; margin:0; padding:0; line-height:0px; font-size:0px; clear:both; overflow:hidden;} /*CSS样式重定义结束 */ 因为各个浏览器对一些属性的预定义不一样,所以要用到以上是常用的CSS重定义,这样写出的页面才能兼容多上一页 [1] [2] [3] [4] 下一页 |
|
|
|
上一个论文: 《班主任工作》学习体会 下一个论文: 参加市教育工作会议心得体会 |
|