9. Display properties of the custom layer:
The performance of the layer is achieved through the structure of the box. A box can be a block-level object or an inline object. The display property is used to control whether the content is block-level or row-level.
Defined as block is the Kuai block level, and inline B behaves Wei as the row level, the default is None.
<HTML> <Head> <title>Display Properties</title> <styletype= "Text/css">Body{text-align:"Center";Font:80% blackbody; }H1{font-size:2em; }H2{font-size:1.5em; }#kuai, #hang{background:Silver;Border:2px solid Black; }span{background: White;Display:Block;Border:0.5em Dashed Green;padding:1em;margin:0.5em; }Span.yanse{background:Yellow; }#hang span{Display:inline; } </style> </Head> <Body> <H1>Blocks and rows</H1> <H2>Block</H2> <PID= "Kuai"><span>Beijing</span><spanclass= "Yanse">Shanghai</span><span>Hong kong</span><spanclass= "Yanse">Hainan</span></P> <H2>Yes</H2> <PID= "Hang"><span>Beijing</span><spanclass= "Yanse">Shanghai</span><span>Hong kong</span><spanclass= "Yanse">Hainan</span></P> </Body></HTML>
0.css Hack:
Different browsers are based on different kernels, and the parsing of CSS is not the same. This directly results in a different page effect for the build. For example, the most direct impact is reflected in the frame model of the distance of understanding. How can i solve a browser-compatible problem? You can only write a different style sheet for different browsers, which is called CSS Hack
Although there are many hack for different browsers, the solution is available. When it comes to solving different layouts in IE and Firefox browsers, one of the most common is!important. Since!important is not supported by IE, other browsers can support it.
<HTML> <Head> <title>CSS Hack</title> <style>. Select{Border:20px Solid Navy!important;width:230px!important;padding:20px!important;Border:20px Solid Orange;width:300px;padding:20px;Font:1.5em new song Body;text-align:"Center"; } </style> </Head> <Body> <Divclass= "Select">The effect in Firefox is a blue border, its width is set to 14em, and the effect in the IE10 browser is an orange border.</Div> </Body></HTML>
When a CSS style sheet encounters Layer 2