Home >Web Front-end >CSS Tutorial >How to create new css rules in dw
1. Click "File" in the menu and select "New"
2. In the new document window, select " Blank page" - "HTML", select "XHTML1.0 transitional" as the document type, click the "Create" button
3. Place the insertion point in the document, and then Click "Format" on the menu bar, select "CSS Style" - "New" in the pop-up drop-down menu
4. In the "New CSS Rule" dialog box , specify the selector type of the CSS rule you want to create:
To create a custom style that can be applied to any HTML element as a class attribute, select Class from the Selector Type pop-up menu option and enter a name for the style in the Selector name text box.
To define the format of a label that contains a specific ID attribute, select the ID option from the Selector Type pop-up menu and enter a unique ID in the Selector Name text box.
To redefine the default format for a specific HTML tag, select the Tag option from the Selector Type pop-up menu and enter an HTML tag in the Selector Name text box or select Select a tag
5. In the "CSS Rule Definition" window, set the type, background, block, box, border, list, positioning, and protection in the The parameters that need to be set, and then click the "OK" button to complete the settings
6. You can also set it in the CSS style panel. Place the insertion point in the document and click the "New CSS Rule" icon below the CSS Styles panel. Then complete the settings in step 6
7. Set the required settings in the CSS properties for type, background, block, box, border, list, positioning, and display protection. Parameters
Recommended tutorial: CSS tutorial
The above is the detailed content of How to create new css rules in dw. For more information, please follow other related articles on the PHP Chinese website!