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 > Internet Technology >
Share
Shulou(Shulou.com)06/02 Report--
Editor to share with you there are several types of css attributes in dw, I believe most people do not know much about it, so share this article for your reference, I hope you can learn a lot after reading this article, let's go to know it!
There are eight types of css attributes in dw, namely: 1, Type type; 2, Background background; 3, Block block; 4, Box box; 5, Border border; 6, List list; 7, Positioning positioning; 8, Extensions extension.
Let's first introduce the properties of the CSS style:
CSS style attributes are divided into eight categories: type, background, block, border, list, positioning, and extension.
The type mainly defines the font, size, color, line height and retouching of the text. As shown in the figure:
Method 1:
The inline style can be nested directly into the HTML tag of the defining object through the style attribute, that is, the value of the style attribute is the inline style, and the format is as follows:
For example, this is the content.
Using inline styles has the following advantages and disadvantages:
Disadvantages:
1. The inline style will be integrated with the content that needs to be displayed, so it will make web page maintenance very troublesome.
two。 Using inline styles requires memorizing a large number of CSS style property names, so inline styles are rarely used in practice
Some attributes in the 3.CSS style are different from those in the HTML tag. For example, the CSS style attribute that represents the text size is called font-size, while the attribute in the tag that represents the text size is named size.
4. It is not as convenient as using the internal style.
Advantages:
1. This usage can be used for almost any HTML tag.
Method 2:
Adopt the internal style:
Click the plus sign in the style panel of DW (press shift+F11 to bring it up) to create a new general style, as shown in the figure:
When you finish setting the style, the definition of the style appears in the code window.
As shown in the figure:
You can change the "" before the style name to "#", and referencing the "#" style requires the use of the id attribute instead of the Class attribute.
The effect picture is as follows:
Method 3:
Adopt an external style:
The internal style refers to the CSS style established in the head of the page document, which can be referenced by all the HTML tags on this page. If you want to create a style that all pages can use, you need to establish an external style.
External style is a .CSS file as the extension of the text file, which contains many style definitions, in DW, use the menu "File" → to create a new "→" General "→" CSS style sheet, you will enter the CSS style file editing window. As shown in the figure:
In the above window, there are three HTML tags, (body,td and th represent the theme, table cell and table row style, respectively, and they are automatically applied to the body of the document, the table cell and the table row, essentially redefining the appearance of the HTML tag. Note: by default, when you create a new HTMl document, the text entered in the body of the page is 16px, black.)
To reference the generic CSS style in the style file, you need to use a tag at the head of the page in the following format:
The rel= "stylesheet" indicates the relationship between the reference file and the current page, that is, the reference file decorates the current page file; the href property sets the referenced CSS style file.
You can then apply this CSS style to any newly created document. The effect picture is as follows:
The above is all the content of the article "there are several types of css attributes in dw". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, 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.