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

How does Dreamweaver8 create CSS Styles

2025-04-07 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

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

This article mainly explains "Dreamweaver8 how to create CSS style", the content of the article is simple and clear, easy to learn and understand, the following please follow the editor's ideas slowly in depth, together to study and learn "Dreamweaver8 how to create CSS style" bar!

Cascading style sheets (CSS) are a series of formatting rules that control the appearance of Web page content. When using CSS to format a page, the content and presentation are separate from each other. The page content (HTML code) is in its own HTML file, while the CSS rules that define the representation of the code are in another file (external stylesheet) or another part (usually part) of the HTML document. With CSS, you can be very flexible and have more control over the appearance of the page, from precise layout positioning to specific fonts and styles.

The term "cascading" refers to the ability to apply multiple styles to the same element or Web page. For example, you can create one CSS rule to apply colors, another rule to apply margins, and then apply both to the same text on a page. The defined styles are "cascaded" into the elements on your Web page, and eventually create the design you want.

The creation of CSS stylesheet can uniformly customize the size, font, color, border, link status and other effects of web text. In Dreamweaver 8, the setting mode of CSS style has been greatly improved, which is more convenient, practical and fast.

Create a CSS style

1. Select "window" > "CSS style". Open the CSS Styles panel.

2. Click the "New CSS Rule" button in the lower right corner of the "CSS style" panel to open the "New CSS Rule" dialog box.

In the Selector Type option, you can choose to create CSS styles in the following three ways:

Class: we can apply the class style to any area or text in the document window. If we apply the class style to an entire paragraph of text, the CLASS attribute appears in the corresponding tag, and the value of the property is the name of the class style.

Tags (redefine the appearance of specific tags): redefine the default format of HTML tags. We can define cascading stylesheets for a particular tag, that is, the defined cascading stylesheet will only be applied to the selected tag. For example, we work for

And tags define cascading style sheets, then all content contained in the and tags will follow the defined cascading style sheets.

Advanced (ID, pseudo-class selector, etc.): define cascading style sheets for specific composite tags, using ID as an attribute to ensure that the document has only available values. Advanced style is a special type of style, and there are 4 commonly used styles:

A:link sets the style of the linked text in the normal state.

A:active sets the appearance of the link when you click the mouse.

A:visited sets the appearance of visited links.

A:hover sets the appearance of the linked text when the mouse is over it.

3. Enter or select a name, tag, or selector for the new CSS style, where:

For custom styles, the name must be dot (. ), if the point is not entered, DW will be automatically added. Custom style names can be a combination of letters and numbers, but. It must be followed by letters.

For redefining HTML tags, you can enter or select a redefined tag in the label drop-down list.

For CSS selector styles, you can enter or select the selector you want in the Selector drop-down list.

4. In the "define in" area, select the defined style location, which can be "New style sheet File" or "for this document only". Click the "OK" button, if you select the "New style sheet File" option, pop up the "Save style sheet File as" dialog box, name the style sheet, save, pop up the "CSS Rule definition" dialog box. If you selected for this document only, click OK, then pop up CSS Rule Definitions and set the CSS style in it.

5. Set the CSS rule definition in the CSS Rule definition dialog box. It is mainly divided into 8 items: type, background, block, box, border, list, positioning and expansion. Each option can be defined in different aspects of the selected label and can be set as needed. When the definition is complete, click the OK button to finish creating the CSS style.

Thank you for your reading, the above is the content of "Dreamweaver8 how to create CSS style", after the study of this article, I believe you have a deeper understanding of how Dreamweaver8 creates CSS style, and the specific use needs to be verified in practice. 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