20151008-20151101 Learning content Three: Css+div

Source: Internet
Author: User
Tags html comment

Css+div


Hyperlinks:<aHert= " "Target (how hyperlinks are opened)= "Self"or "New (open form)"></a>Anchor point: Special application of Hyperlinks<ahref= "#1"...> </a><aname= "1"> </a>table: Container, you can divide this page into regions table cannot move Div: Layer label (default line) set position by coordinates, can be arbitrarily moved table cell can drag and drop more conducive to site optimization<Div> </Div>Css:style: Style sheet controls the style of the label body and all the tags inside the body can be added Stylestyle: style sheet inline style sheet: The style style sheet is written in the Body property position when the stylesheet: written within the head range, To control the style of writing labels on the current page .<Head><style>Body{ /*set the color of the body tag*/Background-color:#309}</style></Head>external style sheet: Link CSS files via link tags play a role in macro-control, later maintenance is convenient<Head>selector: How to control HTML tags with an external style sheet<Linktype= "Text/css"href= "Css/style.css"rel= "stylesheet" /></Head>ID Selector: The identity number of the label, a page inside the body range of all tags can be written id and ID can not be repeated unique recognition in the CSS file set: #p1 {color: #0F9;} Then: function in the original file</Head><Body><PID= "P1">Rer</P><PID= "P2">Sdf</P><PID= "P3">Sdf</P></Body></HTML>Tag Selector: body{/* Set the color of Body label */background-color: #309} precedence follows the ID selector in the CSS comment:/* */in HTML comment<!-- -class selector: First set up in the CSS file. yangshi1{color: #C0F;
Then the link CSS file inside the file is then passed the name of the class= style<Body><PID= "P1">Rer</P><PID= "P2"class= "Yangshi1">Sdf</P><PID= "P3">Sdf</P></Body>



draw a div to make the div fill the entire screen: #apDiv1 {position:absolute;    Width:100%;▲height:100%;▲background-color: #FF0; Z-index:1;} Position is the location: The default is Absolut, with respect to the body to fix the fixed fixed position, such as the navigation bar above the page when the two div superimposed together, Z-index: Starting from 1, the larger the number, the higher the number of layers, covering the z-index in two div: It's 1 o'clock in the body .<DivID= "ApDiv1"></Div><DivID= "ApDiv2"></Div>after writing the one in the above to do a navigation menu, Div Center position:absolute;margin:auto;div, margin set to Auto is, is adaptive, up and down the distance between the free, Depending on the position:absolute, it is at the beginning position, relative, is centered overflow:scroll;--if it exceeds the words to the DIV plus roller hidden--Hide<Divclass= "Yincang"onmouseover= "This.classname= ' Xianshi '"onmouseout= "This.classname= ' Yincang '">

20151008-20151101 Learning content Three: Css+div

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.