css3 new attribute API_html/css_WEB-ITnose
Written in front: Since the CSS5 standard has not yet been fully finalized, browsers with various cores have their own standards. In order not to confuse attributes, each browser adds the following in front of their own standards: a prefix.
The following mainly summarizes the new attributes of CSS3 from the aspects of color, text, selector, etc.
Colorcss1 and css2 can only express color in the following three ways
eg:color:red
(Syntax: #RRGGBB or #RGB The value range of each point is 00- FF)
logue 0%~200%)
CSS3 cannot express transparency in the above mode, and the following expression method has been added
RGBA mode
Syntax: RGBA(R,G,B,A) R red G green B blue A transparent
The value of each point is similar to RGB. The value of A is between 0 and 1
eg: rgba(255,0,0,0.5) represents translucent red
HSL mode (color wheel mode)
Syntax: HSL(H,S,L) H hue S saturation L brightness
The value of H is between 0 and 360. 0 or 360 means red, 120 means green and 240 means blue.
The values of S and L are both between 0% and 100%
HSLA mode
The syntax and values of each point are the same as those of HSL mode. The only difference is that the A at the end represents transparency
eg:hsl(360,50%,50%,0.5 ) Red
Secondly, you can use color:transparent and filter:alpha(opacity=50) in css3 (no filter is only limited to IE)
TextThe commonly used text attributes in css1 and css2 are
The commonly used text attributes in css3 are
The following will introduce a css3 text attribute
text-overflow attribute
Function: Set the text processing method when the content overflows.
Value:
clip: Default value
When the text in the object overflows, the omission mark (...) will not be displayed, but the overflowing part will be cropped. .
ellipsis:
Displays an ellipsis mark (...) when the text within the object overflows.
Note: This attribute needs to be used in conjunction with the over-flow:hidden attribute (out of processing) and white-space:nowrap (disable line breaks), otherwise the effect will not be seen
text-align Attribute
Function: Set text alignment
Value:
left: Default value content is left aligned.
Center: The content is centered.
Right: Content is aligned to the right.
Justify: Justify the content on both ends. At the time of writing this document, only Firefox can see the correct effect
Start: The content is aligned to the starting boundary. (CSS3)
End: Content alignment end boundary. (CSS3)
text-transform attribute
Function: Set the capitalization and other forms of text conversion
Value:
none: Default value No conversion
capitalize: Convert the first letter of each word to uppercase
uppercase: Convert to uppercase
lowercase: Convert to lowercase
full-width: Set the left and right characters to full-width form (CSS3) not supported
full-size-kana: Convert all small kana characters to normal kana (CSS3) not supported For example: Turkish.
text-decoration attribute
Function: Set text decoration line.
Value:
[ text-decoration-color]:
specifies the color of text decoration.
[ text-decoration-line ]: does not support
Specify the type of text decoration line. Equivalent to the text-decoration attribute
[ text-decoration-style] in CSS1:
is not supported to specify the style of text decoration.
blink: The decoration of the specified text is blinking. Only opera and firefox
For example: text-decoration : overline CSS1 instance
text-decoration : #F00 double overline CSS3 instance
text-decoration-line attribute
Function: Set the position of the text modification line.
Value:
none: Default value
The specified text has no decoration
underline:
The decoration of the specified text is underline
overline:
The decoration of the specified text is an overline
line-through:
The decoration of the specified text is a through line
text-decoration-color attribute
Function: Set the color of text decoration lines
Value: Specify color.
text-decoration-style attribute
Function: Set the style of text decoration lines.
Values:
text-shadow attribute
Function: Set the shadow effect of text
Value:
none: Default value No shadow
text-fill-color attribute
Function: Text fill color, specify the color of the text fill part
Value: Color
Note: To use this attribute, you need to use the browser prefix
text-stroke attribute
Function: text border color, specify the color of the text stroke part
takes Value:
Set or retrieve the stroke thickness of the text in the object
Set or retrieve the stroke color of the text in the object
Note: Using this attribute requires using the browser prefix
text-stroke-width attribute
Function: Specifies the width of the stroke part of the text. The derived attribute of text-stroke
Value: length
Note: Using this attribute requires the browser prefix
The text-stroke-color attribute
functions: specifies the color of the stroke part of the text. The derived attribute of text-stroke
value: color
Note: required to use this attribute The browser seems to have the prefix
tab-size attribute
. Its function is to set the display length of a tab indent key on the page.
Value: Default value: 8 (length or integer value)
Explanation: Integer value: z-index:1 1 here is an integer value, no unit is needed, similar to a multiple .
Length: margin:10px where 10px is the length value.
Note: This attribute is only valid when displayed within the
tag (preformatted state). Because the browser automatically ignores whitespace characters.Opera and Firefox need to use browser private prefixes.
word-wrap attribute
Function: How to handle overflow text (especially English-like text).
Values:
Allow content to push or overflow the specified container boundaries.
Line breaks are allowed within words if necessary.
SelectorElement Selector
Relationship Selector
Pseudo-Class Selector
Attribute Selector
Pseudo-Object Selector
css1 and css2
css1&css2 element selector
css1&css2 relationship selector
css1&css2 pseudo-class selection
css1&css2 attribute selector
css1&css2 pseudo-object selector
css3 relationship selector
css3 pseudo-class selector
css3 attribute selector
css3 pseudo-object selector

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

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

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics











The roles of HTML, CSS and JavaScript in web development are: 1. HTML defines the web page structure, 2. CSS controls the web page style, and 3. JavaScript adds dynamic behavior. Together, they build the framework, aesthetics and interactivity of modern websites.

The future trends of HTML are semantics and web components, the future trends of CSS are CSS-in-JS and CSSHoudini, and the future trends of JavaScript are WebAssembly and Serverless. 1. HTML semantics improve accessibility and SEO effects, and Web components improve development efficiency, but attention should be paid to browser compatibility. 2. CSS-in-JS enhances style management flexibility but may increase file size. CSSHoudini allows direct operation of CSS rendering. 3.WebAssembly optimizes browser application performance but has a steep learning curve, and Serverless simplifies development but requires optimization of cold start problems.

The future of HTML is full of infinite possibilities. 1) New features and standards will include more semantic tags and the popularity of WebComponents. 2) The web design trend will continue to develop towards responsive and accessible design. 3) Performance optimization will improve the user experience through responsive image loading and lazy loading technologies.

HTML 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.

The 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, CSS and JavaScript are the core technologies for building modern web pages: 1. HTML defines the web page structure, 2. CSS is responsible for the appearance of the web page, 3. JavaScript provides web page dynamics and interactivity, and they work together to create a website with a good user experience.

HTMLisnotaprogramminglanguage;itisamarkuplanguage.1)HTMLstructuresandformatswebcontentusingtags.2)ItworkswithCSSforstylingandJavaScriptforinteractivity,enhancingwebdevelopment.

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