In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly explains how to embed stylesheets in CSS. Interested friends may wish to have a look at it. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn the method of embedding style sheets in CSS.
CSS can be regarded as a breakthrough in web design, which solves the problem of web interface typesetting. It can be said that the Tag of HTML mainly defines the content of the web page (Content), while CSS determines how the web content is displayed (Layout).
In the early days of Web, HTML was a limited language that didn't care about appearance; it was just a simple, small markup mechanism.
With the emergence of Mosaic web browsers, websites began to emerge everywhere. The need for pages to change their appearance increases, so tag elements like and are added.
A few years later, most Web markup consists almost entirely of tables and font elements, and does not convey any real meaning to the content to be represented, making the document less available and difficult to maintain.
So in 1995, the W3C issued a draft of CSS in an attempt to solve the problem of mixed structure and style.
In 1996, the W3C officially launched CSS1.
In 1998, CSS2 was launched.
Starting from CSS3 in 2001, the CSS language was divided into several independent modules, each of which was graded independently and contained only a small number of functions.
Start designing CSS4 in 2011
First, the introduction of css style sheets
1. Embedded style sheet
Embedded style sheets are written in Tag (tags). The inline style is only valid for the Tag in which it resides. (if there are multiple styles, the embedding will overwrite other styles and take effect of your own.)
Example:
This style definition
The text inside is 20pt font and the font color is red.
two。 Internal style sheet
The internal stylesheet is written in HTML. The internal stylesheet is valid only for the page on which it is located.
The internal stylesheet uses the Tag of style, which is written as follows:
Div {
Color:red
}
3. External style sheet
If many web pages need to use the same Styles, use external stylesheets. The external stylesheet needs to write the style in a css file, then introduce it in the page with tags, and introduce the file in each page to which the style needs to be applied.
Example:
...
1. The location of the label is generally written in the label.
2. The name of the css style file is named with meaningful English letters, such as main.css.
3. Href= "" is the way to introduce css.
4. Rel= "stylesheet" type= "text/css" is fixed and cannot be modified.
Remember their priorities: inline > embedded > external
There are also comment statements in CSS: marked with / * comment statements * / (used in Html)
At this point, I believe that you have a deeper understanding of "the method of CSS embedded stylesheet". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!
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.