The perfect look of front-end development tool CSS_html/css_WEB-ITnose

WBOY
Release: 2016-06-24 11:50:32
Original
996 people have browsed it

Please master HTML knowledge first! ! ! ! For details, see: Organizing common tags in HTML

4. Starting with CSS

1. Understand CSS styles
One of the benefits of using CSS styles is that by defining a certain style, text in different web page locations can have unified fonts, font sizes or colors

2. Advantages of CSS styles
                                                                                                                                           can be set with
p{color:blue}(selector{attribute declaration value})
Selector: Also known as selector, it indicates the elements in the web page to which style rules should be applied. In this example, it is all the paragraphs in the web page ( The text of p) will turn blue, while other elements (such as ol) will not be affected.
Declaration: What is enclosed in English curly brackets "{}" is the declaration, and the attributes and values ​​are separated by English colons ":". When there are multiple statements, they can be separated by English semicolons ";"

4. CSS comment code
Use /*comment statement*/ to indicate it (use )

5. Basic knowledge of CSS styles
1. Inline CSS styles (written directly in existing HTML tags)

The text here is red.


Note that it should be written in the start tag of the element. The css style code should be written in double quotes. If there are multiple css style code settings, they can be written together and separated by semicolons. Open
                                                                                                                                                                                                                                                                                                 ​



2. Embedded CSS style (written in the current file)
Write the css style code in , and generally embedded css styles are written between

3. External CSS style (written in a separate file)
Write the css code in a separate external file. This css style file has the extension ".css" and is in the (not within the