0428CSS: Style, selector, font

Source: Internet
Author: User
Tags tag name

CSS style Sheets
|-three types of methods introduced
|--inline style
|----Label interior (space style)
|--inline style
|----|--style of the outer Union
|----<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>


|-selector (Find way)
|--id unique, through # Lookup
|--class can be duplicate and pass. Find
|--< tag name > through < tag name > find (<DIV>/<SPAN>: control all Div/span tags)
|--parallel selection through, lookup (can be side-by-side control of different types of:id,class,<div>,<span>)
|--descendants choose to find through spaces (only control the style of descendants)

/* The pound sign # stands for id*/#weiyi {}/* selects the element *//* id= "Weiyi". Represents class*/.kechongming{}/* Select All class= "kechongming" elements *//* direct control via tag name */div {}/* Select all div*/span{}/* Select All span*//* side-by-side selection, add between elements, */#weiyi,. kechongming,div,class,span{}/* Spaces Select Descendants */#houdai div{}/* SELECT ID = All div*/.houdai_ in elements of "Houdai" span{}/* Select all houdai_!--selectors span*/<--><div "id=" in all elements of class= "Weiyi" >< /div><div class= "kechongming" ></div><div class= "kechongming" ></div><div class= " Kechongming "></div><div id=" Houdai "> <div></div> <div></div> <span> </span> <span></span></div>


|-style
|-size Width: width height
|-Background Background-color COLOR
|-Background image
|--background-image:url ("") Picture path
|--background-size: Picture size
|--background-repeat:no-repeat Deleting 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 style */}<!--style--><!--size and background-- <div style= "width:200px; height:200px; "></div><div id=" Beijingtupian "></div>


|-fonts (font text)
|--font style font-family (Microsoft Black, arial, italic, etc.)
|--the size of the font font-size
|--font Format Font-style
|--the weight of the font font-weight
|--Color of font
|--Add line text-decration to font:

/* Font style */span{font-family: "Microsoft Jas Black";  font-size:16px; font-style:italic;/* Font italic */font-weight:bolder;/* font Bold */text-decoration:line-through;/* strikethrough (through: through) */color: Orange;} < styles for!--fonts--><span> font styles </span>

0428CSS: Style, selector, font

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.