In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces the relevant knowledge of what CSS is used to do, the content is detailed and easy to understand, the operation is simple and fast, and it has a certain reference value. I believe you will gain something after reading this CSS article. Let's take a look at it.
CSS is an abbreviation for Cascading Styke Sheet (cascading style sheets). Is a markup language that is used (enhanced) to control the style of rendered web pages and allows you to separate CSS style information from page HTML content. CSS does not need to be compiled and can be executed directly by the browser (browser-interpreted language). CSS is a domain language (DSL). Cascading and inheritance give CSS unlimited creativity. It is precisely because it is so "simple" that we need to learn it more fully and use it handy to make our web page present vividly.
History
CSS was first proposed in 1994.
It was first supported by browsers in 1996
In 1996, W3C officially launched CSS1.
In 1998, W3C officially launched CSS2.
CSS2.1 is now recommended by the W3C.
CSS3 is still under development.
CSS 3 is improved on top of all the CSS 2 support, so you don't have to worry about compatibility.
CSS also supports a variety of devices, such as mobile phones, televisions, slides, printers, etc., but CSS has been better promoted in browsers.
CSS syntax
Selector {property:value;}
Introduction mode
There are three ways to add stylesheets to your web page:
Inline style Inline Styles
Inlining is to define the stylesheet attribute that applies to it using the style attribute of the object within the tag of the element.
Internal style Block object Embedding a Style Block
You can insert a block object into the tag of your HTML document.
External style sheet Linking to a Style Sheet
You can first create an external stylesheet file * .css, and then use HTML's link object. Or use @ import to introduce.
@ import url ("demo.css")
Note: in actual development, it is recommended to use HTML's link object to introduce.
Selector weight
The weights are mainly divided into four levels:
First class: represents the inline style, such as:, the weight is 1000
Second class: represents an ID selector, such as # content, with a weight of 100
Third: representative classes, pseudo classes and attribute selectors, such as .content, with a weight of 10
Fourth, it represents a tag selector and a pseudo-element selector, such as div p, with a weight of 1
Priority
Follow the following rules:
All selectors have a weight, and the larger the weight, the better the priority.
When the weights are equal, the later stylesheet settings are better than the first stylesheet settings.
The creator's rule is higher than the viewer's: that is, the CSS style set by the web writer takes precedence over the style set by the browser
The inherited CSS style is not as good as the CSS style specified later
The! important rule has the highest priority in the same set of property settings.
This is the end of the article on "what CSS is used for". Thank you for reading! I believe you all have a certain understanding of the knowledge of "what CSS is used for". If you want to learn more, you are welcome to follow the industry information channel.
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.