当前位置:Gxlcms > css > css中voice-family:"\"}\"";有什么作用?

css中voice-family:"\"}\"";有什么作用?

时间:2021-07-01 10:21:17 帮助过:13人阅读

css中voice-family: "\"}\"";有什么作用?

#centercontent { 
                 background-color: #006600;
                   background-image: url(../img/home_main_bg.gif);
                   background-repeat: repeat-x;
                   height: 502px;
                   width: 772px;
                   margin-top: 0px;
                   margin-right: auto;
                  margin-bottom: 0px;
                   margin-left: auto;
                   border: 1px solid #006600;
                   voice-family: "\"}\""; 
                   voice-family: inherit; 
                   height: 500px;
                   width: 770px;
}

在此设定宽度为770PX,边框为1PX,但在Window IE5.5以前的浏览器中浏览页面时,main层宽度会比实际宽度少2px(770px-1px-1px),因此需要予以纠正,在此就介绍一种纠正方法。此处利用了样式表的“层叠”特性,对于同一个选择符的相同属性,后定义的值会覆盖前面定义的值。

而"voice-family:"\"}\"" ;voice-family:inherit;" 是CSS的语音属性,由于Window IE5.5不完全支持CSS2,不识别此属性,因此跳到下一个选择符。

IE5并不能正确读取voice-family: “\”}\”"; voice-family:inherit;这两段,所以在读取第二个Width前就放弃读取#centercontent了。

这样便能在同一个Class里定义两个Width值。(而实际上这是重复定义的典型,不过并不会在其他浏览器产生问题。)

另一种不用voice-family: "\"}\"";的方法来解决:

width: 770px
width : 772px;

以上就是css中voice-family: "\"}\"";有什么作用?的详细内容,更多请关注Gxl网其它相关文章!

人气教程排行