Home  >  Article  >  Web Front-end  >  CSS usage skills you don’t know

CSS usage skills you don’t know

php中世界最好的语言
php中世界最好的语言Original
2018-03-13 10:10:381461browse

This time I will bring you CSS usage skills that you don’t know. What are the precautions when using CSS? Here are practical cases, let’s take a look.

8e99a69fbe029cd4e2b854e244eab143In enterprise development, modifying styles is done by CSS128dba7a3a77be0113eb0bea6ea0a5d0

What are the benefits of modifying styles through CSS?
1. No need to memorize Which attributes belong to which tags
2. When the requirements change, we do not need to modify a lot of code to meet the requirements
3. In front-end development, CSS has only one role, which is to modify the style

8e99a69fbe029cd4e2b854e244eab143Fixed format128dba7a3a77be0113eb0bea6ea0a5d0

1. Format:

2. Notes:

1. The style tag must be written at the beginning of the head tag Between the tag and the end tag (that is, it must be a sibling relationship with the title tag)

2. The type attribute in the style tag does not need to be written. The default is type="text/css", which is the user's This means telling the system that this pair of style tags stores text-type css code

3. When setting the style, it must be set in a fixed format. key: value;
where: cannot be omitted, semicolon In most cases, it cannot be omitted.

4. How to learn CSS?
CSS learning is divided into two parts, one is CSS properties, and the other isCSS selector . In other words, after learning these two parts of CSS, there will be nothing else.

I believe you have mastered the method after reading the case in this article. For more exciting information, please pay attention to other related articles on the PHP Chinese website!

Recommended reading:

How to load HTMLString in iOS webView

html5 little knowledge that is easily overlooked

A few small exercises about regular expressions

Why does the constructor not prompt in swift?

The above is the detailed content of CSS usage skills you don’t know. For more information, please follow other related articles on the PHP Chinese website!

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