Home > Web Front-end > H5 Tutorial > body text

CSS usage skills you don't know

php中世界最好的语言
Release: 2018-03-13 10:10:38
Original
1566 people have browsed it

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.

In enterprise development, modifying styles is done by CSS

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

Fixed format

1. Format:

<style type="text/css">
        标签名称{
            属性名称: 属性对应的值;
            ...
        }</style>
Copy after login

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!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!