Home  >  Article  >  Backend Development  >  css review

css review

WBOY
WBOYOriginal
2016-08-08 09:28:241276browse

Key points:
span. align:center}
p{font-family:sens serif}
p{link:color #FFF000}
ul li{list-style-image:url[xxx.jpg]} list logo
table{border-collapse:1px solid blue} Form single border
2. Box model
*{margin:0;
border:0}
{padding-left:20%}
p{border-style:solid solid solid none}
p{margin:0.25 in}
3. Positioning
div h1 p is called a block element
span strong is called an inline element (by setting the display attribute to block)
eg: (

This paragraph contains a separate Relatively positioning EG: H2.pos_Left
{POSITION: related:
left: -20px} Absolute float
4. Selector
H2 {color:silver;}
Merge selection: body, h2, p, table, th, td, pre, strong, em {color:gray;}
Class selection:


This heading is very important.



This paragraph is very important.


.important {color:red;}
ID selector:

This is a paragraph of introduction.


Settings #intro {font-weight:bold;}
Attribute Selector
If you want to select all planet elements with the moons attribute, use It displays in red, but the text of the first element is not red
Venus
Earth
The descendant selector
treats the h1 element as a descendant The text of the em element turns red. Other em text (such as em in paragraphs or block quotes) will not be selected by this rule
h1 em {color:red;}
Select child elements
h1 > strong {color:red;}
Select adjacent siblings
h1 + p {margin-top:50px;}
pseudo-class (colon)
a:link {color: #FF0000}


p:first-child {font-weight: bold;}
pseudo-element
p:first -letter
The above has introduced css review, including aspects of it. I hope it will be helpful to friends who are interested in PHP tutorials.

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn