In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-20 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
In this article Xiaobian introduces you in detail "what are the methods of introducing style into CSS", the content is detailed, the steps are clear, and the details are handled properly. I hope that this article "what are the methods of introducing style into CSS" can help you solve your doubts? the following is followed by Xiaobian's train of thought to learn new knowledge.
There are three ways to introduce style sheets in CSS:
(1) inline style
(2) embedded style
(3) external style
Each of these CSS styles has its advantages and disadvantages. I will introduce you in more detail next.
Inline style
Features: (1) the inline style is placed in the HTML element in the code.
(2) when using an inline style, the style will only affect the elements you choose.
(3) there is no selector for inline style.
Example:
This CSS inline style can only change the width and height of the div, it does not change the style of any div or properties on the page. This is one of the limitations of inline styles. Because they only make changes to specific elements, this is not a best practice, and inline styles are very specific. This makes it difficult to overwrite them with other non-inline styles. In fact, we rarely use inline styles on web pages.
Embedded style
Features: (1) it is placed in the header part of the web page written by the style tag.
(2) the written style will be used only for the web pages on which you use it.
(3) embedded style is also called "internal style".
Exampl
Document
Div {
Width:100px
Height:100px
Border:1pxsolid#ccc
}
An embedded style is a style embedded in the head of a document. Embedded styles affect only the tags on the page they embed. Third, this approach negates one of the advantages of CSS. Because each page has a style, if you want to make a site-wide change, such as changing the link color from red to green, you need to make this change on each page because each page uses an embedded stylesheet. This is better than the inline style, but in many cases there are still problems.
External style sheet
Features: (1) write in separate documents and attach to various Web documents
(2) modify it to affect all the pages you call.
(3) easy to modify the operation.
Exampl
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.