Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What are the inheritance, cascading and particularity of CSS?

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly explains "what is the inheritance, cascading and particularity of CSS". The content in the article is simple and clear, and it is easy to learn and understand. Please follow the editor's train of thought to study and learn "what is the inheritance, cascading and particularity of CSS".

Some styles of CSS are inherited, and inheritance is a rule that allows styles to be applied not only to a particular HTML tag element, but also to its descendants.

Particularity: different selectors have different weights, the weight of the label is 1, the weight of the class selector is 10, the maximum weight of the ID selector is 100.

Cascading means that there can be multiple CSS styles for the same element in the HTML file. When styles with the same weight exist, they will be determined according to the order of these CSS styles, and the CSS style at the end will be applied.

CSS formatted typesetting

Text typesetting

Font, body {font-family: "Microsoft Yahei";}

Font size, color, body {font-size:12px;color:#666}

Bold, body {font-weight:bold;}

Italic, body {font-style:italic;}

Underscore, body {font-style:italic;}

Delete line, body {text-decoration:line-through;}

Paragraph typesetting

Indent, p {text-indent:2em;}

Line spacing (row height), p {line-height:1.5em;}

Chinese character spacing, letter spacing, letter-spacing:50px; and word-spacing:50px

Alignment, div {text-align:center;}

Thank you for your reading, the above is the content of "what is the inheritance, cascading and particularity of CSS". After the study of this article, I believe you have a deeper understanding of what is the inheritance, cascading and particularity of CSS. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report