Home >Web Front-end >HTML Tutorial >CSS common tags
Commonly used CSS tags
One CSS text property
color : #999999; /*text color*/
font-family: 宋体,sans-serif; /*Text font*/
font-size : 9pt; /*text size*/
font-style:itelic; /*text italic*/
font-variant:small-caps; /*small font*/
letter-spacing: 1pt; /*space between letters*/
line-height : 200%; /*Set line height*/
font-weight:bold; /*Bold text*/
vertical-align:sub; /*subscript*/
vertical-align:super; /*superscript*/
text-decoration:line-through; /*Add strikethrough*/
text-decoration: overline; /*Add top line*/
text-decoration:underline; /*underline*/
text-decoration:none; /*No decoration line*/
text-transform: capitalize; /*Capitalize the first character*/
text-transform: uppercase; /*English uppercase*/
text-transform : lowercase; /*English lowercase*/
text-align:right; /*Align text right*/
text-align:left; /*Align text to the left*/
text-align:center; /*Align text in the center*/
text-align:justify; /*Text alignment*/
vertical-align:top; /*Vertically align the top of the largest element within the row of elements/
vertical-align:bottom; /*Vertically align the bottom of the largest element within the row of elements*/
vertical-align:middle; /*Vertical center alignment*/
vertical-align:text-top; /*Vertically align the top of the parent element*/
vertical-align:text-bottom; /*Vertically align the bottom of the parent element*/
The difference between top, bottom, text-top and text-bottom:
2. CSS border blank
padding-top:10px; /*Leave the top border blank*/
padding-right:10px; /*Leave the right border blank*/
padding-bottom:10px; /*Leave the bottom border blank*/
padding-left:10px; /*Leave the left border blank
3. CSS symbol properties
list-style-type:none; /*No mark*/
list-style-type:decimal; /*Arabic numeral mark*/
list-style-type:lower-roman; /*Lowercase Roman numerals, such as: i, ii, iii, iv, v, etc.*/
list-style-type:upper-roman; /*Uppercase Roman numerals, such as: I, II, III, IV, V, etc.*/
list-style-type:lower-alpha; /*lowercase English letter mark*/
list-style-type:upper-alpha; /*uppercase English letter mark*/
list-style-type:disc; /*solid circle mark*/
list-style-type:circle; /*Hollow circle mark*/
list-style-type:square; /*solid square mark*/
list-style-image:url(/dot.gif); /*Customized image tag*/
list-style-position: outside; /*convex row*/
list-style-position:inside; /*indent*/
4. CSS background style
/*Background Color*/
background:transparent; /*Perspective background*/
background-image: url(/image/bg.gif); /*background image*/
background-attachment : fixed; /*watermark fixed background*/
background-repeat : repeat; /*repeat arrangement-web page default*/
background-repeat : no-repeat; /*No repeated arrangement*/
background-repeat : repeat-x; /*repeat on x-axis*/
background-repeat : repeat-y; /*repeat on the y-axis*/
Specify background position
background-position : x% y%; /*Position of x and y axes of background image*/
background-position : top; /*align upward*/
background-position : buttom; /*align downward*/
background-position : left; /*Align left*/
background-position : right; /*Align right*/
background-position : center; /*center alignment*/
5. CSS connection properties
a /*All hyperlinks*/
a:link /*Hyperlink text format*/
a:visited /*Visited link text format*/
a:active /*Format of pressed link*/
a:hover /*mouse to link*/
Mouse cursor style:
Prohibited cursor:not-allowed;
Link finger cursor: pointer
cursor:crosshair
Help cursor (there will be a question mark) cursor:help
Cross arrow cursor:move
Text T-shaped cursor:text
Background program running type cursor:progress
Funnel cursor:wait
Arrow pointing right or right cursor:w-resize or cursor:e-resize
Arrow pointing up or down cursor:n-resize or cursor:s-resize
/*These four values correspond to the first letters of the English letters of southeast, northwest and northwest respectively*/
The arrow points to the upper right or lower right cursor:ne-resize or cursor:se-resize
The arrow points to the upper left or lower left cursor:nw-resize or cursor:sw-resize
/*The first letter of these four values is the first letter of north or south*/
Custom cursor p {cursor:url("cursor file name.ico"),text;}
/*Customized cursors are prone to incompatibility issues, so you need to add a default cursor type*/
6. List of CSS frames
border-top : 1px solid #6699cc; /*top border*/
border-bottom : 1px solid #6699cc; /*bottom border*/
border-left : 1px solid #6699cc; /*left border*/
border-right : 1px solid #6699cc; /*right border*/
The above is the recommended way of writing, but you can also use the conventional way as follows:
border-top-color : #369 /*Set the top color of the border line*/
border-top-width:1px /*Set the top width of the top border*/
border-top-style: solid/*Set the top style of the border line*/
Other border styles
solid /*solid frame*/
dotted /*dotted box*/
double /*double frame*/
groove /*Three-dimensional inner convex frame*/
ridge /*Three-dimensional relief frame*/
inset /*concave frame*/
outset /*convex frame*/
7. CSS border style
margin-top:10px; /*upper border*/
margin-right:10px; /*right margin value*/
margin-bottom:10px; /*Lower border value*/
margin-left:10px; /*left margin value*/
8. Commonly used CSS combinations
Mycss1 {display: Block; Margin: 0px; padding: 0px; white-spie: pre-wrap; "& gt; #ddd; 50px ;font-size:30px;}