Home > Article > Web Front-end > Complete collection of css styles (organized version)
This chapter will share with you a complete collection of css styles (organized version) ), it has certain reference value. Friends in need can refer to it. I hope it will be helpful to you.
Font attributes: (font)
Size{font-size: x-large;}(extra large) xx-small;(extremely small) Generally not used in Chinese, just use numerical values, units: PX, PD
Style{font-style: oblique;}(italic) italic;(italic) normal;(normal)
line-height{line-height: normal;}(normal) Unit: PX, PD, EM
Thickness{font-weight: bold;}(bold) lighter ;(Thin body) normal;(Normal)
Variant{font-variant: small-caps;}(small capital letters) normal;(normal)
Case {text-transform: capitalize;}(first letter capitalized) uppercase;(uppercase) lowercase;(lowercase) none;(none)
Modification {text-decoration: underline;} (underline) overline;(overline) line-through;(strikethrough) blink;(flashing)
Commonly used fonts: (font-family)
"Courier New", Courier, monospace, "Times New Roman" , Times, serif, Arial, Helvetica, sans-serif, Verdana
Background attribute: (background)
Color{background-color: #FFFFFF;}
Picture{background-image: url();}
Repeat{background-repeat: no-repeat;}
Scroll{background-attachment: fixed;}(fixed) scroll; (Scroll)
Position{background-position: left;}(horizontal) top(vertical);
Abbreviation method { background:#000 url(..) repeat fixed left top;} /*Abbreviation·This often appears when reading code, so you should study it carefully*/
Block attribute: (Block) /* This is the first time I know this attribute, so I need to study more*/
Word spacing {letter-spacing: normal;} value/*This attribute seems useful, please practice more*/
Alignment{text-align: justify;}(Align both ends) left;(Align left) right;( Right aligned) center; (center)
Indent {text-indent: numerical value px;}
Vertical alignment{vertical-align: baseline;}(baseline) sub;(subscript) super;(subscript) top; text-top; middle; bottom; text-bottom;
Word-spacing: normal; value
Space white-space: pre; (reserved) nowrap; (no line wrapping )
Display{display:block;} (block) inline; (embedded) list-item; (list item) run-in; (append part) compact; (compact) marker; (marker) table; inline-table; table-raw-group; table-header -group; table-footer-group; table-raw; table-column-group; table-column; table-cell; table-caption;(table title) /*The understanding of the display attribute is very vague*/
Box properties: (Box)width:; height:; float:; clear:both; margin:; padding:; Order: top, right, bottom, left
Border attribute: (Border)
border -style: dotted; (dotted line) dashed; (dashed line) solid; double; (double line) groove; (groove line) ridge; (ridge) inset; (dented) outset;
border-width:; border width
border-color:#;
Abbreviation method border: width style color; /*Abbreviation*/
List attribute: (List-style)
Type list-style-type: disc; (dot) circle; (circle) square; (square) decimal; (number) lower-roman; (小罗code number) upper-roman; lower-alpha; upper-alpha;
Position list-style-position: outside;(外) inside;
Image list-style-image: url(..);
Positioning attribute: (Position) p>
Position: absolute; relative; static; p>
visibility: inherit; visible; hidden; p>
overflow: visible; hidden; scroll; auto;
clip: rect(12px,auto, 12px,auto) (cropped)
CSS attribute code list
One CSS text attribute:
color : #999999; /*Text color*/
font-family: 宋体,sans-serif; /*Text font*/
font-size : 9pt; /*text size*/
font-style:itelic; /*Text italics* /
font-variant:small-caps ; /*Small font*/
letter -spacing: 1pt; /*Distance between words*/
line-height : 200%; /*Set line height */
font-weight:bold; /*Bold text*/
vertical -align:sub; /*Subscript*/
vertical-align:super; /*superscript*/
text-decoration:line-through; /*strikethrough*/
text-decoration: overline; /*Add top line*/
text-decoration:underline; /*Underline*/
text-decoration:none; /*Remove link underline*/
text-transform: capitalize; /*Capitalize the first word*/
text-transform : uppercase; /*English uppercase*/
text-transform : lowercase; /*English lowercase* /
text-align:right; / *Text is right aligned*/
text- align:left; /*Align text to the left*/
text-align:center; /*Text-aligned in the center*/
text-align:justify; /*Text alignment*/
vertical-align attribute
vertical-align:top; /*Align vertically upward*/
vertical-align:bottom; /*Align vertically downward*/
vertical-align:middle; /*Vertical center alignment*/
vertical-align:text-top; /*Align text vertically upward*/ p>
vertical-align:text-bottom; /*Text vertical Align downward*/
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 lower border blank*/
padding-left:10px; /*Leave the left border blank
3. CSS symbol attributes:
list-style-type:none; /*Not numbered*/
list-style-type:decimal; /*Arabic numerals*/ p>
list-style-type:lower-roman; /*Lowercase Roman numerals*/
list -style-type:upper-roman; /*Uppercase Roman numerals*/
list-style-type:lower-alpha; /*lowercase English letters*/
list-style-type:upper-alpha; /*uppercase English letters*/
list-style-type:disc; /*solid circle symbol*/
list-style-type:circle; /*Hollow circle symbol*/
list-style-type:square; /*Solid square symbol*/
list -style-image:url(/dot.gif); /*Picture-style symbol*/
list-style-position: outside; /*convex row*/
list-style-position:inside; /*indent*/
4. CSS background style:
background-color:#F5E2EC; /*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 repeat arrangement*/
background-repeat : repeat-x; /*Repeat on the x-axis*/
background-repeat : repeat-y; /*Repeat on the y-axis Arrange*/
Specify background Position
background-position : 90% 90%; /*Position of x and y axes of background image*/
background-position : top; /*align up*/
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 /*Viewed links Text format*/
a:active / *Click the link format*/
a:hover /*Mouse to link*/
Mouse cursor style: strong>
Link finger CURSOR: hand
crosshair cursor:crosshair
arrow pointing down cursor:s-resize
Cross arrow cursor:move
Arrow to the right cursor:move
Add a question mark cursor:help
Arrow to the left cursor:w-resize
arrow pointing up cursor:n-resize
Arrow pointing up and to the right cursor:ne-resize
Arrow pointing up and to the left cursor:nw-resize
Text I-type cursor:text
Arrow diagonally lower right cursor:se-resize
Arrow diagonally lower left cursor:sw-resize
Funnel cursor:wait
Cursor pattern (IE6) p {cursor:url("cursor file name.cur"),text;}
6. List of CSS frames :
border-top : 1px solid #6699cc; /*upper 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 writing method, but you can also use regular The method is as follows:
border-top-color : #369 /*Set the top color of the upper border*/
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 line frame*/
groove /*three-dimensional inner convex frame*/
ridge /*three-dimensional relief frame*/
inset /*concave frame*/
outset /*convex frame*/
7. CSS form application:
Text box
Button
checkbox
Select button
Multiline text box
Drop-down menu option 1 option 2
8. CSS border style:
margin-top:10px; /*upper border*/
margin-right:10px; /*right margin value*/
margin-bottom:10px; /*lower boundary value*/
margin-left:10px; /*Left margin value* /
CSS properties: Font Style (Font Style)
Serial number Chinese description mark syntax
1 font style{font:font-style font-variant font-weight font-size font-family}
2 font type{font-family:"Font 1"," Font 2","Font 3",...}
3 font size{font-size:numeric|inherit| medium| large| larger| x-large| xx-large| small| smaller| x-small| xx-small}
4 font style{font-style:inherit|italic|normal|oblique }
5 font-weight :100-900|bold|bolder|lighter|normal;}
6 font color{color:value;}
7 shadow color{text-shadow:16-bit color value}
8 font line height{line-height:numeric|inherit|normal;}
9 letter spacing{letter-spacing:numeric|inherit|normal}
10 word spacing {word-spacing:numeric|inherit|normal}
11 font deformation {font-variant:inherit|normal|small-cps} p>
12 English transformation {text-transform:inherit| none|capitalize|uppercase|lowercase}
13 Font deformation{font-size-adjust:inherit|none}
14 font{font-stretch:condensed|expanded|extra-condensed|extra-expanded|inherit|narrower|normal| semi-condensed|semi-expanded|ultra-condensed|ultra-expanded|wider}
Text Style
Serial number Chinese description mark syntax
1 line spacing{line-height:numeric|inherit|normal;}
2 text decoration {text-decoration:inherit|none|underline|overline|line-through|blink}
3 space at the beginning of paragraph {text-indent:value|inherit} p>
4 horizontal alignment {text-align:left| right|center|justify}
5 vertical Align {vertical-align:inherit|top|bottom|text-top|text-bottom|baseline|middle|sub|super}
6 Writing mode{writing-mode:lr-tb|tb-rl}
Background style
Serial number Chinese description markup syntax
1 Background color {background-color: value}
2 background image{background-image: url(URL)|none}
3 background repeat{background-repeat:inherit|no-repeat|repeat|repeat-x|repeat-y}
4 background fixed{background-attachment:fixed|scroll}
5 background positioning{background-position:value|top|bottom|left|right|center}
6 Back style {background: background color| Background image|Background repeat|Background attachment|Background position}
Frame Style (Box Style)
Serial number Chinese description mark syntax
1 margin {margin:margin-top margin- right margin-bottom margin-left}
2 padding {padding:padding-top padding-right padding-bottom padding-left}
3 border width{border-width:border-top-width border-right-width border-bottom-width border-left-width}
Width value: thin|medium|thick|value
4 border color {border-color: numerical value numerical value} Value: represents respectively top, right, bottom, left color values
5 border style{border-style:none|hidden|inherit|dashed|solid|double|inset|outset|ridge|groove}
6 borders{border:border-width border-style color}
Top border{border-top:border-top-width border-style color}
right border{border-right:border-right-width border-style color}
bottom border{border-bottom :border-bottom-width border-style color}
Left border{border-left:border-left-width border-style color}
7 width{width:length|percent|auto}
8 height{height:numeric|auto}
9 float{float:left|right|none}
10 clear{clear:none|left|right|both}
Category List
Serial number Chinese description mark syntax
1 control display { display:none|block|inline|list-item}
2 control white space {white-space:normal|pre| nowarp}
3 symbol list {list- style-type:disc|circle|square|decimal|lower-roman|upper-roman|lower-alpha|upper-alpha|none}
4 graphic list{list-style-image:URL}
5 position list{list-style-position:inside|outside}
6 Directory list {list-style: directory style type|directory style location|url}
7 mouse shape {cursor:hand| crosshair|text|wait|move|help|e-resize|nw-resize|w-resize|s-resize|se-resize|sw-resize}