css中 *margin-bottom:20px!important;解释下这里的*及!important的作用

来源:学生作业帮助网 编辑:作业帮 时间:2024/04/27 22:14:24
css中 *margin-bottom:20px!important;解释下这里的*及!important的作用

css中 *margin-bottom:20px!important;解释下这里的*及!important的作用
css中 *margin-bottom:20px!important;解释下这里的*及!important的作用

css中 *margin-bottom:20px!important;解释下这里的*及!important的作用
*是区分浏览器兼容性的,写在一条样式里可以区分IE6、IE7和别的浏览器的不同,如:
.bor { border:20px solid green; *border:20px solid red ; padding:30px;width :300px;}
绿色边框的样式写在前面,这时候所有浏览器都是绿色边框,红色边框的样式用了*,IE6和IE7能识别,其他浏览器不能识别,所以覆盖了前面的绿色边框,所以IE6和IE7显示红色边框,其他浏览器显示绿色边框
!important的作用是提高指定样式规则的应用优先权.写在定义的最后面,例如:box{color:red !important;} 最重要的一点是:IE 6.0一直都不支持这个语法,而其他的浏览器都支持.因此我们就可以利用这一点来分别 比如:
.bor{ border:20px solid red !important; border:20px solid green;padding:30px;width :300px;}
因为ie6不认识!important,后面的绿色边框样式就会覆盖前面那句红色边框样式,而如ie7、火狐等浏览器认识!important,知道这一条样式的优先级要比后面那句高,就只会执行这句红色边框的样式.

css中 *margin-bottom:20px!important;解释下这里的*及!important的作用 在CSS中,margin:10px auto; margin-bottom:35px;这两句写在一起,分别是哪个方面的距离?还有那个位置position:relative和position:absolute,分别是在什么时候需要用到?尽量少用那些专业术语. CSS BOX有哪些属性下列不属于CSS中BOX属性的是( ).A.margin B.visibilityC.padding D.border 在CSS中,margin:0 auto 有的书上说它表示居中,请问:是什么居中?举个例子好吗? 知道padding-left和margin-left的区别,但CSS中left和padding-left有什么具体区别呢? CSS中class和id的区别例如:CSSBBS新手教程第一课div{ width:100px; height:100px; border:1px solid #000; float:left; background:#99FF00; margin-left:10px;}.css{ background:#FFFF00}#css{ background:#00FFFF}直接div.css#css我修改运行 CSS里border-top和margin-top什么意思? CSS里面的属性margin-right:auto; margin-left:auto;是什么意思? 还有 line-height是什么意思 css代码中 margin:auto 和 margin:0 auto 有什么区别?两个都能实现居中效果.只是我想知道有什么区别.还有auto是怎么实现居中的. 仿一个网页CSS中*{margin:0; padding:0;}有什么用没有这个就不行,div.meinv这个地方的网页就乱了,1加上*{margin:0; padding:0;}在CSS中顶部就有用了,但是一加上这个我自己设计的网页就乱了怎么回事,怎么 如图,三角形ABC中,外角∠ACD的平分线与∠ABC的平分线交于A1,∠A1BC与∠A1CD?<p style=margin-top:0cm;margin-right:0cm;margin-bottom:3.75pt;margin-left:0cm;line-height:19.5pt;word-break:break-all>如图,△ABC中,外角∠ACD的 CSS中 *+height是什么意思 CSS中a: css中“text-indent: CSS中 .nav{background:url(img/bgli_left.gif) repeat-x scroll left bottom;}重点解释scroll重点解释scroll.X轴左下角平铺 DIV+CSS * { margin:0;padding:0;border:1px solid red;} CSS里的margin和position:relative 属性有什么区别啊! CSS里border-bottom-width:thin;是什么意思;什么时候用到 border-bottom-width:thin; border-bottom-width:thin;与boder-bottom:1px solid #000有什么区别;