Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What are the technologies that CSS tries to avoid?

2025-01-30 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/01 Report--

What are the knowledge points of this article "CSS try to avoid the use of technology?" most people do not understand, so the editor summarizes the following content, detailed content, clear steps, and has a certain reference value. I hope you can get something after reading this article. Let's take a look at this "what are the technologies that CSS tries to avoid using?"

1 、 Internet Explorer Behaviors

Internet Explorer 5 introduces behaviors. Behaviors is a way to add behavior to HTML elements by using CSS.

Why avoid it? Only Internet Explorer supports the behavior attribute. For example:

H2 {behavior: url (behave.htc)}

2. Avoid multiple style sheets as much as possible

In development, many of our rookies will write like this, that is, a CSS per page, resulting in a lot of stylesheets, which is quite troublesome to apply and unfriendly to optimization, we should optimize our CSS as much as possible, for example, common styles are put in a stylesheet, the head is put together, the bottom is put together, in short, find similarities to define our CSS stylesheet.

3. Write a "good" CSS

We can't judge by "right" and "wrong", we will judge by the words "good", "better", "very bad" and "very good". When we use CSS stylesheets, we often classify them according to the following. By function: the css that controls fonts is concentrated in the font.css file. Press the css that controls the color to be concentrated in the color.css file. Css that controls the layout is concentrated in the layout.css file. Divide by chunk: put the css of the head in the head.css. Place the bottom in the foot.css. Place the sidebar in sidebar.css. Put the body in the main.css.

The above is about the content of this article on "what are the technologies that CSS tries to avoid?" I believe we all have a certain understanding. I hope the content shared by the editor will be helpful to you. If you want to know more about the relevant knowledge, please follow the industry information channel.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report