1. Import external CSS:
<LinkREL= "Stylesheet"Type= "Text/CSS"Href= "Skin/CSS/index.css">
2. Horizontal Div
# Search{Width:10%;Float:Left;}
Float: left;This attributeLet search float to the left so that other elements can be placed behind it (on the right.
3. two divs are connected together without any gaps
# A {Background: # ff0000; width: 70%; Height: 20px; float: Left; }# B {Background: # ff0000; width: 30%; Height: 20px; float: right ;}
4. Div outer border
Border: 1px solid # CCC;
5. dotted line
<HR style = "border: 1px dashed # CCC; Height: 1px">
6. Role of the IMG label ALT, for example:
<IMGALT= "Wood with pictures"SRC= "Skin/images/index/left_top.jpg">
When the image in SRC cannot be displayed due to a slow online image, incorrect path, or other reasons, the text description in ALT is used instead.
PS: the actual pixels are used for the width. No matter how large your browser window is, the original size will be displayed, so that the image is not easy to deform. If the percentage is used, it is the percentage of the parent layout, and the size of the meeting changes with the size of the browser window.