search
HomeWeb Front-endHTML TutorialSummary of css properties

Summary of css properties

Jul 23, 2017 pm 04:38 PM
cssRecord

Commonly used CSS properties:

Font attributes: (font)
sizefont-size: x-large;(extra large) xx-small;(extremely small) Generally used for Chinese No, just use numerical values. Unit: PX, PD
font-style: oblique;(italic) italic;(italic) normal;(normal)
Line-height: normal;(Normal) Units: PX, PD, EM
Thickness font-weight: bold;(Bold font) lighter;(Thin font) normal;( Normal)
variant font-variant: small-caps;(small capital letters) normal;(normal)
uppercase and lowercase text-transform: capitalize;(first Uppercase letters) uppercase; (uppercase) lowercase; (lowercase) none; (none)
Modify text-decoration: underline; (underline) overline; (upperline) line-through; (delete Line) blink; (flash)
Commonly used fonts: (font-family)
"Courier New", Courier, monospace, "Times New Roman", Times, serif, Arial, Helvetica, sans-serif, Verdana
Background properties: (background)
Color
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;
Block attribute: (Block)
letter-spacing: normal; value
Yes Liu text-align: justify; (align both ends) left; (align left) right; (align right) center; (center)
Indent text-indent: value px;
vertical-align: baseline;(baseline) sub;(subscript) super;(subscript) top; text-top; middle; bottom; text-bottom;
word spacing word-spacing: normal; value
white-space: pre;(reserved) nowrap;(no line break)
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)
Box attribute : (Box)
width:; height:; float:; clear:both; margin:; padding:; Order: top, right, bottom, left
Border attributes: (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;
List attribute: (List-style)
Type list-style-type: disc; (dot) circle; (circle) square; (square) decimal; (number) lower-roman; (decimal Roman code number) upper-roman; lower-alpha; upper-alpha;
Position list-style-position: outside; (outside) inside;
Image list-style-image: url(..);
Positioning attributes: (Position)
Position: absolute; relative; static;
visibility: inherit; visible; hidden;
overflow: visible; hidden; scroll; auto;
clip: rect(12px,auto,12px,auto) (cut)

css attribute code collection
One CSS text attribute:
color : #999999; /*Text color*/
##font-family : Songti, sans-serif; /*Text font*/
font-size : 9pt; /*Text size*/
font-style:itelic; /* Text italics*/
font-variant:small-caps; /*Small font*/
letter-spacing: 1pt; /*The distance between characters*/ line-height : 200%; /*Set line height*/
font-weight:bold; /*Text bold*/
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; /*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 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 upward*/
vertical-align:bottom; /*Align vertically downward*/
vertical-align:middle; /*Vertical Center alignment*/
vertical-align:text-top; /*Align text vertically upward*/
vertical-align:text-bottom; /*Text vertically 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 bottom border blank*/
padding-left :10px; /*Leave the left border blank
3. CSS symbol attributes:
list-style-type:none; /*No number*/
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*/
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 repeat arrangement*/
background-repeat : repeat-x; /*Repeat arrangement on the x-axis*/
background-repeat : repeat-y; /*Repeat the arrangement on the y-axis*/
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; /*Toward Align right*/
background-position : center; /*Align center*/
5. CSS connection properties:
a /*All hyperlinks*/
a:link /*Hyperlink text format*/
a:visited /*Viewed link text format*/
a:active /*Clicked link format*/
a: hover /*Mouse to link*/
Mouse cursor style:
Link finger CURSOR: hand
Cross body cursor:crosshair
Arrow pointing down cursor:s-resize
Cross arrow cursor:move
Arrow pointing right cursor:move
Add a question mark cursor:help
Arrow pointing left cursor:w-resize
Arrow pointing up cursor:n-resize
Arrow to the upper right cursor:ne-resize
Arrow to the upper left cursor:nw-resize
Text I type cursor:text
Arrow diagonally lower 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;}
6. CSS border list:
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*/
and above This is the recommended writing method, but you can also use the conventional method 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 top border*/
Other frame styles
solid /*solid frame*/
dotted /*dotted frame*/
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
Check box
Select button
Multi-line 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 margin value*/
margin-left:10px; /*Left margin value*/

CSS attribute: Font Style (Font Style)
Serial number Chinese description markup 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: value|inherit| medium| large| larger| x- large| xx-large| small| smaller| ##5 Font thickness {font-weight:100-900|bold|bolder|lighter|normal;}
6 Font color {color:Number;}
7 Shadow color {text-shadow: 16-bit color value}
8 Font line height {line-height: value|inherit|normal;}
9 word spacing {letter-spacing: numerical value|inherit|normal}
10 word spacing {word-spacing: numerical value|inherit|normal}
11 font deformation{ font-variant:inherit|normal|small-cps }
12 English conversion {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}
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}
Background style
Serial number Chinese description mark syntax
1 Background color{
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 Border blank {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: value value value value} Value value : Represents top, right, bottom, and left color values ​​respectively
5 Border style {border-style:none|hidden|inherit|dashed|solid|double|inset|outset|ridge|groove}
6 Border {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: value|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}

The above is the detailed content of Summary of css properties. 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 difference between an HTML tag and an HTML attribute?What is the difference between an HTML tag and an HTML attribute?May 14, 2025 am 12:01 AM

HTMLtagsdefinethestructureofawebpage,whileattributesaddfunctionalityanddetails.1)Tagslike,,andoutlinethecontent'splacement.2)Attributessuchassrc,class,andstyleenhancetagsbyspecifyingimagesources,styling,andmore,improvingfunctionalityandappearance.

The Future of HTML: Evolution and TrendsThe Future of HTML: Evolution and TrendsMay 13, 2025 am 12:01 AM

The future of HTML will develop in a more semantic, functional and modular direction. 1) Semanticization will make the tag describe the content more clearly, improving SEO and barrier-free access. 2) Functionalization will introduce new elements and attributes to meet user needs. 3) Modularity will support component development and improve code reusability.

Why are HTML attributes important for web development?Why are HTML attributes important for web development?May 12, 2025 am 12:01 AM

HTMLattributesarecrucialinwebdevelopmentforcontrollingbehavior,appearance,andfunctionality.Theyenhanceinteractivity,accessibility,andSEO.Forexample,thesrcattributeintagsimpactsSEO,whileonclickintagsaddsinteractivity.Touseattributeseffectively:1)Usese

What is the purpose of the alt attribute? Why is it important?What is the purpose of the alt attribute? Why is it important?May 11, 2025 am 12:01 AM

The alt attribute is an important part of the tag in HTML and is used to provide alternative text for images. 1. When the image cannot be loaded, the text in the alt attribute will be displayed to improve the user experience. 2. Screen readers use the alt attribute to help visually impaired users understand the content of the picture. 3. Search engines index text in the alt attribute to improve the SEO ranking of web pages.

HTML, CSS, and JavaScript: Examples and Practical ApplicationsHTML, CSS, and JavaScript: Examples and Practical ApplicationsMay 09, 2025 am 12:01 AM

The roles of HTML, CSS and JavaScript in web development are: 1. HTML is used to build web page structure; 2. CSS is used to beautify the appearance of web pages; 3. JavaScript is used to achieve dynamic interaction. Through tags, styles and scripts, these three together build the core functions of modern web pages.

How do you set the lang attribute on the  tag? Why is this important?How do you set the lang attribute on the tag? Why is this important?May 08, 2025 am 12:03 AM

Setting the lang attributes of a tag is a key step in optimizing web accessibility and SEO. 1) Set the lang attribute in the tag, such as. 2) In multilingual content, set lang attributes for different language parts, such as. 3) Use language codes that comply with ISO639-1 standards, such as "en", "fr", "zh", etc. Correctly setting the lang attribute can improve the accessibility of web pages and search engine rankings.

What is the purpose of HTML attributes?What is the purpose of HTML attributes?May 07, 2025 am 12:01 AM

HTMLattributesareessentialforenhancingwebelements'functionalityandappearance.Theyaddinformationtodefinebehavior,appearance,andinteraction,makingwebsitesinteractive,responsive,andvisuallyappealing.Attributeslikesrc,href,class,type,anddisabledtransform

How do you create a list in HTML?How do you create a list in HTML?May 06, 2025 am 12:01 AM

TocreatealistinHTML,useforunorderedlistsandfororderedlists:1)Forunorderedlists,wrapitemsinanduseforeachitem,renderingasabulletedlist.2)Fororderedlists,useandfornumberedlists,customizablewiththetypeattributefordifferentnumberingstyles.

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 Article

Hot Tools

SAP NetWeaver Server Adapter for Eclipse

SAP NetWeaver Server Adapter for Eclipse

Integrate Eclipse with SAP NetWeaver application server.

MinGW - Minimalist GNU for Windows

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.

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

ZendStudio 13.5.1 Mac

ZendStudio 13.5.1 Mac

Powerful PHP integrated development environment

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