search
HomeWeb Front-endHTML TutorialThe most comprehensive summary of CSS styles

The most comprehensive summary of CSS styles

Jan 11, 2018 am 09:51 AM
cssSummarize

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!

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
What is the root tag in an HTML document?What is the root tag in an HTML document?Apr 29, 2025 am 12:10 AM

TheroottaginanHTMLdocumentis.Itservesasthetop-levelelementthatencapsulatesallothercontent,ensuringproperdocumentstructureandbrowserparsing.

Are the HTML tags and elements the same thing?Are the HTML tags and elements the same thing?Apr 28, 2025 pm 05:44 PM

The article explains that HTML tags are syntax markers used to define elements, while elements are complete units including tags and content. They work together to structure webpages.Character count: 159

What is the significance of <head> and <body> tag in HTML?What is the significance of <head> and <body> tag in HTML?Apr 28, 2025 pm 05:43 PM

The article discusses the roles of <head> and <body> tags in HTML, their impact on user experience, and SEO implications. Proper structuring enhances website functionality and search engine optimization.

What is the difference between <strong>, <b> tags and <em>, <i> tags?What is the difference between <strong>, <b> tags and <em>, <i> tags?Apr 28, 2025 pm 05:42 PM

The article discusses the differences between HTML tags , , , and , focusing on their semantic vs. presentational uses and their impact on SEO and accessibility.

Please explain how to indicate the character set being used by a document in HTML?Please explain how to indicate the character set being used by a document in HTML?Apr 28, 2025 pm 05:41 PM

Article discusses specifying character encoding in HTML, focusing on UTF-8. Main issue: ensuring correct display of text, preventing garbled characters, and enhancing SEO and accessibility.

What are the various formatting tags in HTML?What are the various formatting tags in HTML?Apr 28, 2025 pm 05:39 PM

The article discusses various HTML formatting tags used for structuring and styling web content, emphasizing their effects on text appearance and the importance of semantic tags for accessibility and SEO.

What is the difference between the 'id' attribute and the 'class' attribute of HTML elements?What is the difference between the 'id' attribute and the 'class' attribute of HTML elements?Apr 28, 2025 pm 05:39 PM

The article discusses the differences between HTML's 'id' and 'class' attributes, focusing on their uniqueness, purpose, CSS syntax, and specificity. It explains how their use impacts webpage styling and functionality, and provides best practices for

What is the 'class' attribute in HTML?What is the 'class' attribute in HTML?Apr 28, 2025 pm 05:37 PM

The article explains the HTML 'class' attribute's role in grouping elements for styling and JavaScript manipulation, contrasting it with the unique 'id' attribute.

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

WebStorm Mac version

WebStorm Mac version

Useful JavaScript development tools

SAP NetWeaver Server Adapter for Eclipse

SAP NetWeaver Server Adapter for Eclipse

Integrate Eclipse with SAP NetWeaver application server.

Safe Exam Browser

Safe Exam Browser

Safe Exam Browser is a secure browser environment for taking online exams securely. This software turns any computer into a secure workstation. It controls access to any utility and prevents students from using unauthorized resources.

mPDF

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),