0428-CSS style

Source: Internet
Author: User
Tags tag name

First, CSS style sheet
Three ways to introduce
1. Inline style: Label interior style
2, inline style:3. Outer style: <link rel= "stylesheet (style sheet)" type= "Text/css" href= "CSS file path"/>

<!--outreach Style (link: contact)--><link rel="stylesheet" type="text/css " href=" "/><!--inline (style: style, style)--><style type="text/css" ><!--inline--><div style=""></div>

Ii. selectors (find relevant in the container)
1, id unique, through # Search
2, Lass can be duplicate name, pass. (dot) find
3, < tag name > through < tag name > find (<DIV>/<SPAN>: control all Div/span tags)
4, side-by-side selection through, find (can be tied to control different types of:id,class,<div>,<span>)
5. Descendants choose to search by space (only control the style of descendants)

/*Pound sign # Rep ID*/#weiyi {}/*Select the element that id= "Weiyi"*//*. Represents class*/. kechongming{}/*Select all elements of class= "kechongming"*//*direct control via tag name*/div{}/*Select all div*/span{}/*Select all spans*//*parallel selection, element Plus,*/#weiyi,. Kechongming,div,class, span{}/*Spaces Select Descendants*/#houdai div{}/*Select all the div in the element id= "Houdai"*/. Houdai_ span{}/*selects all spans in all elements of the class= "Houdai_"*/<!--selector--><div id="Weiyi"></div><divclass="kechongming"></div><divclass="kechongming"></div><divclass="kechongming"></div><div id="Houdai"> <div></div> <div></div> <span></span> <span></span></div >

Three, style
1. Size: Width: Height
2:, Background: Background-color color

3, background Image: ①,background-image:url ("") Picture path

②, background-size: Picture size

③, background-repeat:no-repeat delete the default tile

/*style size and background*/#beijingtupian {margin-top:10px;  width:200px;  height:200px;  border:1px solid red; Background-image:url (.. /.. /xiaomi/disanhanggundong.png); Background-size:150px,100px;/*Background Size*/background-repeat:no-repeat;/*background Tiling method*/}<!--style--><!--size and background--><div style="width:200px; height:200px; Background-color:green ;"></div><div id="Beijingtupian"></div>

Four, fonts (font text)
1, the style of the font: font-family (Microsoft ya Black, song body, italics, etc.)
2, the size of the font: font-size
3. Font format: Font-style
4, the weight of the font: font-weight
5, the color of the font:
6. Add line to font: text-decration:

 /*   font style   */ span{font -family:  "  Microsoft ya Black   " ;  Font -SIZE:16PX; Font -style:italic; /*   font italic  */  font -weight:bolder; /*   font bold  */  text -decoration:line-through; /*   strikethrough (through: through)  */  Color:orange;}  <!--font style--><span> font style </span> 

0428-CSS style

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.