18.9.14 Afternoon on the 40th day of the class

CSS common selector Commonly used three selectors Tag selector p{ Color: red; } Id selector Id: (uniqueness) Id naming: numbers, letters, underscores, underscores (-), cannot begin with a number #p_1{ Font-size: 30px; Color: yellowgreen; } Class selector .p_2{ Font-weight: bold; Color: yellow; } The priority of the three selectors: Id selector>class selector> tag selector

  

CSS other selectors

代代选择器 As long as the tag object is included Div span{ Font-size: 27px; Font-family: Song style; Color: red; } Sub-selector Div>span{ Color: red; } Brother selector will only change the adjacent element objects below #p_1+p{ Color: green; } Brother selectors all subsequent brother objects will change #p_1~p{ Color: red; Font-size: 30px; } Pseudo-class selectors need to be written in order, otherwise the effect will not be displayed a:link{text-decoration:none} has not been visited. a:visited{color:#ccc} visited a:hover{color: red;text-decoration:red} Mouse over the hyperlink, showing red and underlined. a:active{color:#FF7400} Selected link

字体:(font) /* font color */ Color: gray; / * font size * / Font-size: 12px; / * font bold * / /*font-weight: bold;*/ /* font style */ /*font-family: Arial; */ /* font tilt */ /*font-style: italic;* Text (text) /*Underlined display*/ Text-decoration: underline; /* remove the underscore */ Text-decoration: none; /* indicates that a certain paragraph of text is not available*/ Text-decoration:line-through; /* text centered */ Text-align: center; /**Text level is centered*/ Line-height=The height of the parent element of the text The border property has three modifier properties ?border-color ?border-color:red; ?border-top-color:blue; ?border-width ?border-width: 1px; ?border-left-width: 3px; ?border-style ?border-style: solid ?border-bottom-style: solid; Can use the border unified settings ?border: 1px solid red; Border-right: 5px dotted blue; .border: the size of the border the style of the border the color of the border

===========================================================================