Home  >  Article  >  Web Front-end  >  Ask some basic knowledge about this aspect_html/css_WEB-ITnose

Ask some basic knowledge about this aspect_html/css_WEB-ITnose

WBOY
WBOYOriginal
2016-06-24 12:12:20957browse

1: What role does .list1 {} play in CSS? We often see fields like this in CSS files. There is nothing in the curly brackets. What does this do?



2: I recently downloaded several web page templates and studied the source codes. The biggest confusion is that there are too many settings for color and font size, which makes it a bit dizzy. , why the font size has been set in BODY, but the size is also set in other small parts? ?

3: There are so many colors, and they all use # plus numbers and letters. Is it necessary to remember the commonly used ones? If it is not necessary, where can I find it when I need it? ?


Reply to the discussion (solution)

Dashenmen come in and take a look

Dashenmen come in and take a look

1. .list1 is the class selector of css, and commonly used ones include id tag selectors, etc.
For example, if
.test { color:red; }
is defined, then you can write it like this in HTML

123
Its color is red
Empty curly braces have no effect, maybe they are just marked for convenience to write later

2. css The font, inline and other attributes will be inherited.
For example, if the font size of 12px is defined in the body, then the font size in the page will be 12px (some browsers have different parsing and need to be redefined. For example, the form control under IE6 cannot Inherit the font size defined by body), but we also want to define other tags with larger font sizes, then we can define

as needed. 3. Color value: Just remember the commonly used ones, and use them when needed. , just select it in PS and paste it.

1 Empty ones have no effect
2 For small parts, reset them as needed. If the font is unnecessary
3 Don’t remember it, who can remember it?

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn