Home  >  Article  >  Web Front-end  >  What is the role of voice-family: "\"}\""; in css?

What is the role of voice-family: "\"}\""; in css?

黄舟
黄舟Original
2017-07-17 14:12:592565browse

What is the role of voice-family: "\"}\""; in css?

#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;
}

The width is set to 770PX and the border is 1PX. However, when browsing the page in browsers before Window IE5.5, the width of the main layer will be 2px less than the actual width (770px-1px-1px) , so it needs to be corrected, and a correction method is introduced here. The "cascading" feature of the style sheet is used here. For the same attribute of the same selector, the value defined later will overwrite the value defined earlier.

And "voice-family:"\"}\"" ;voice-family:inherit;" is the voice attribute of CSS. Since Window IE5.5 does not fully support CSS2, it does not recognize this attribute, so it jumps Go to the next selector.

IE5 cannot correctly read the two paragraphs voice-family: "\"}\""; voice-family:inherit;, so it gives up reading #centercontent before reading the second Width. .

This way, two Width values ​​can be defined in the same Class. (In fact, this is a typical example of repeated definition, but it will not cause problems in other browsers.)

Another one without voice-family: " \"}\""; method to solve:

width: 770px
width: 772px;

The above is the detailed content of What is the role of voice-family: "\"}\""; in css?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn