This article mainly shares the most comprehensive CSS styles, which are very complete. Mastering these styles will definitely complete a perfect CSS page. Friends who need it can refer to it. I hope it can help everyone.
One font attribute: (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) Units: PX, PD, EM ;}(small caps) normal;(normal)
uppercase{text-transform: capitalize;}(first letter capitalized) uppercase;(uppercase) lowercase;(lowercase) none;(none)
Modification{ text-decoration: underline;}(underline) overline;(overline) line-through;(strikethrough) blink;(blink)
Commonly used fonts: (font-family)
"Courier New", Courier , monospace, "Times NewRoman", 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 in reading code, so study it carefully*/
Block attribute: (Block) /*This is the first time I know this attribute, so I need to study more*/
Letter-spacing: normal;} Value /*This attribute seems useful, please practice more*/
Alignment{text-align: justify;}(align both ends)left;(align left) right;(align right) center;(center)
Indent{text-indent: value px;}
Vertical alignment{vertical-align: baseline;}(baseline) sub;(subscript) super;(subscript)top; text-top; middle; bottom; text-bottom;
Word-spacing: normal ; Value
White-space: pre; (reserved) nowrap; (no line break)
Display {display:block;} (block) inline; (embedded) list-item; (list item) run- in; (additional 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 display attribute is very unclear*/
Box attribute: (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;(dent) 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; ( Lower-alpha; upper-alpha;
Position list-style-position: outside; (outside) inside;
Image list-style-image: url(..);
Positioning attribute: (Position)
Position: absolute; relative; static;
visibility: inherit; visible; hidden;
overflow: visible; hidden; scroll; auto;
clip: rect (12px,auto,12px,auto) (Crop)
Second CSS text properties:
color : #999999; /*Text color*/
font-family : Song Dynasty, sans-serif; /*Text font*/font-size : 9pt; /*Text size*/
font-style:itelic; /*Text italic*/
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; / *Add strikethrough*/
text-decoration: overline; /*Add top line*/
text-decoration:underline; /*Add underline*/
text-decoration:none; /*Delete link Underline*/
text-transform : capitalize; /*First word capitalized*/
text-transform : uppercase; /*English capitalized*/
text-transform : lowercase; /*English lowercase*/
text-align:right; /*Text is aligned to the right*/
text-align:left; /*Text is aligned to the left*/
text-align:center; /*Text is aligned to the center*/
text-align:justify; /*Text alignment*/
vertical-align attribute
vertical-align:top; /*Align vertically upwards*/
vertical-align:bottom; /*Vertically downwards Alignment*/
vertical-align:middle; /*Vertical center alignment*/
vertical-align:text-top; /*Text is aligned vertically upward*/
vertical-align:text-bottom; / *Align text vertically downward*/
3. 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
4. CSS symbol attributes:
list-style-type:none; /*Unnumbered*/
list-style-type:decimal; /*Arabic numerals*/
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*/
5. 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 arrangement on the x-axis */
background-repeat : repeat-y; /* Repeat the arrangement on the y axis*/
6. Specify the background position
background-position : 90% 90%; /* The position of the x and y axes of the 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; /*Align center*/
7. CSS connection properties:
a /*All hyperlinks*/
a:link /*Hyperlink text format*/
a:visited /*Viewed link text format*/
a:active /*Format of pressed link*/
a:hover /*Mouse to link*/
Mouse cursor style:
Link finger CURSOR: hand
Cross cursor:crosshair
Arrow Downward 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 up cursor:n-resize
Arrow pointing to the upper right cursor:ne-resize
Arrow pointing to the upper left cursor:nw-resize
Text I type cursor:text
Arrow diagonally lowering to the right cursor:se-resize
Arrow obliquely lower left cursor:sw-resize
Funnel cursor:wait
Cursor pattern (IE6) p {cursor:url("cursor file name.cur"),text;}
8. CSS border list:
border-top: 1px solid #6699cc; /*Top border*/
border-bottom: 1px solid #6699cc; /*Bottom border*/
border-left : 1px solid #6699cc; /*Left border line*/
border-right : 1px solid #6699cc; /*Right border line*/
The above is the recommended writing method, but it can also be used The conventional method is as follows:
border-top-color : #369 /*Set the top color of the top border*/
border-top-width:1px /*Set the top width of the top border*/
border -top-style: solid/*Set the top style of the top frame*/
9. Other frame styles
solid /*Solid line frame*/
dotted / *Dotted frame*/
double /*Double frame*/
groove /*Three-dimensional inner convex frame*/
ridge /*Three-dimensional relief frame*/
inset /*Concave frame*/
outset /*convex frame*/
8. CSS form application:
Text box
Button
Check box
Select button
Multi-line text box
Drop-down menu option 1 option 2
9. CSS border style:
margin-top:10px; /*upper border*/
margin-right:10px; /*right margin value*/
margin-bottom:10px; /*lower margin value*/
margin-left:10px; /*left margin value*/
10. CSS properties: Font Style
1 Font style{font:font-stylefont-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 thickness {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: value|inherit|normal;}
9 Letter spacing {letter-spacing: value|inherit| normal}
10 Word spacing {word-spacing:value|inherit|normal}
11 Font transformation {font-variant:inherit|normal|small-cps}
12 English conversion {text-transform:inherit |none|capitalize|uppercase|lowercase}
13 Font deformation{font-size-adjust:inherit|none}
14Font
{font-stretch:condensed|expanded|extra-condensed|extra-expanded |inherit|narrower|normal|semi-condensed|semi-expanded|ultra-condensed|ultra-expanded|wider}
11. Text Style
1 Line spacing {line-height: value|inherit|normal;}
2 Text decoration {text-decoration:inherit|none|underline|overline|line-through|blink}
3 Space at the beginning of paragraph {text-indent :numeric|inherit}
4 Horizontal alignment {text-align:left|right|center|justify}
5 Vertical alignment
{vertical-align:inherit|top|bottom|text-top|text- bottom|baseline|middle|sub|super}
6 Writing mode {writing-mode:lr-tb|tb-rl}
12. Background style
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}
13. Frame Style (Box Style)
1 Border blank {margin :margin-topmargin-right margin-bottom margin-left}
2 padding {padding:padding-toppadding-right padding-bottom padding-left}
3 border width
{border-width:border-top -widthborder-right-width border-bottom-width border-left-width}
Width value: thin|medium|thick|value
4 Border color {border-color: value value value value} Values: represent respectively top, right, bottom, left color values
5 Border style
{border-style:none|hidden|inherit|dashed|solid|double|inset|outset|ridge|groove}
6 Border{border :border-widthborder-style color}
Top border{border-top:border-top-width border-style color}
Right border{border-right:border-right-width border-stylecolor}
Bottom border {border-bottom:border-bottom-width border-stylecolor}
Left border{border-left:border-left-width border-style color}
7 Width{width:length|percent|auto}
8 Height {height: value|auto}
9 Float {float:left|right|none}
10 Clear {clear:none|left|right|both}
Fourteen , Category list
1 Control display {display:none|block|inline|list-item}
2 Control blank {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 position|url}
7 Mouse shape
{ cursor:hand|crosshair|text|wait|move|help|e-resize|nw-resize|w-resize|s-resize|se-resize|sw-resize}
Related recommendations:
Dreamweaver web page production uses css style nesting method
Sample code for displaying CSS styles in Angular4
Setting table CSS What should you pay attention to in style
The above is the detailed content of The most comprehensive summary of CSS styles. For more information, please follow other related articles on the PHP Chinese website!
HTML vs. CSS vs. JavaScript: A Comparative OverviewApr 16, 2025 am 12:04 AMThe roles of HTML, CSS and JavaScript in web development are: HTML is responsible for content structure, CSS is responsible for style, and JavaScript is responsible for dynamic behavior. 1. HTML defines the web page structure and content through tags to ensure semantics. 2. CSS controls the web page style through selectors and attributes to make it beautiful and easy to read. 3. JavaScript controls web page behavior through scripts to achieve dynamic and interactive functions.
HTML: Is It a Programming Language or Something Else?Apr 15, 2025 am 12:13 AMHTMLisnotaprogramminglanguage;itisamarkuplanguage.1)HTMLstructuresandformatswebcontentusingtags.2)ItworkswithCSSforstylingandJavaScriptforinteractivity,enhancingwebdevelopment.
HTML: Building the Structure of Web PagesApr 14, 2025 am 12:14 AMHTML is the cornerstone of building web page structure. 1. HTML defines the content structure and semantics, and uses, etc. tags. 2. Provide semantic markers, such as, etc., to improve SEO effect. 3. To realize user interaction through tags, pay attention to form verification. 4. Use advanced elements such as, combined with JavaScript to achieve dynamic effects. 5. Common errors include unclosed labels and unquoted attribute values, and verification tools are required. 6. Optimization strategies include reducing HTTP requests, compressing HTML, using semantic tags, etc.
From Text to Websites: The Power of HTMLApr 13, 2025 am 12:07 AMHTML is a language used to build web pages, defining web page structure and content through tags and attributes. 1) HTML organizes document structure through tags, such as,. 2) The browser parses HTML to build the DOM and renders the web page. 3) New features of HTML5, such as, enhance multimedia functions. 4) Common errors include unclosed labels and unquoted attribute values. 5) Optimization suggestions include using semantic tags and reducing file size.
Understanding HTML, CSS, and JavaScript: A Beginner's GuideApr 12, 2025 am 12:02 AMWebdevelopmentreliesonHTML,CSS,andJavaScript:1)HTMLstructurescontent,2)CSSstylesit,and3)JavaScriptaddsinteractivity,formingthebasisofmodernwebexperiences.
The Role of HTML: Structuring Web ContentApr 11, 2025 am 12:12 AMThe role of HTML is to define the structure and content of a web page through tags and attributes. 1. HTML organizes content through tags such as , making it easy to read and understand. 2. Use semantic tags such as, etc. to enhance accessibility and SEO. 3. Optimizing HTML code can improve web page loading speed and user experience.
HTML and Code: A Closer Look at the TerminologyApr 10, 2025 am 09:28 AMHTMLisaspecifictypeofcodefocusedonstructuringwebcontent,while"code"broadlyincludeslanguageslikeJavaScriptandPythonforfunctionality.1)HTMLdefineswebpagestructureusingtags.2)"Code"encompassesawiderrangeoflanguagesforlogicandinteract
HTML, CSS, and JavaScript: Essential Tools for Web DevelopersApr 09, 2025 am 12:12 AMHTML, CSS and JavaScript are the three pillars of web development. 1. HTML defines the web page structure and uses tags such as, etc. 2. CSS controls the web page style, using selectors and attributes such as color, font-size, etc. 3. JavaScript realizes dynamic effects and interaction, through event monitoring and DOM operations.


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

mPDF
mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),

SAP NetWeaver Server Adapter for Eclipse
Integrate Eclipse with SAP NetWeaver application server.

WebStorm Mac version
Useful JavaScript development tools

MinGW - Minimalist GNU for Windows
This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.

VSCode Windows 64-bit Download
A free and powerful IDE editor launched by Microsoft






