CSS basic tutorial: How to introduce CSS

Embedded

Introduce CSS styles through the

Tips: The CSS style in

习近平心中的互联网

互联网是20世纪最伟大的发明,它正在将人类“一网打尽”,人们在不知不觉中已经融入了互联网生态,互联网让世界变成了“鸡犬之声相闻”的地球村。


External link

##Introduce an external CSS file through the tag ( .css), in this case, the common CSS code can be shared by multiple web pages.

Common attributes of tags

  • rel: That is, what type of file is imported. Value: stylesheet

  • type: content type.

  • href: The imported CSS file address.

Note:

  • ## tag is placed in the tag.

  • The same web page can use multiple to link to multiple external style files.



##Inline style (mainly used For the style of JS control elements)

Every HTML tag has some common attributes: class, id, title, style.

The value of the style attribute in the HTML tag is exactly the same as the style in CSS.

Note:

    In inline styles, CSS code cannot be written too much;
  • In inline style, multiple CSS properties cannot be wrapped, that is, they can be written in one line.
  • Inline styles have the highest priority, even higher than ID selectors.
  • In the previous example of priority, we used this introduction method
  •     php.cn  
    

    习近平心中的互联网


Continuing Learning
||
php.cn

习近平心中的互联网

互联网是20世纪最伟大的发明,它正在将人类“一网打尽”,人们在不知不觉中已经融入了互联网生态,互联网让世界变成了“鸡犬之声相闻”的地球村。

submit Reset Code
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!