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

How css uses Verdana fonts for body elements of a site

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

Share

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

This article mainly introduces how css gives the body elements of the site to use Verdana fonts, has a certain reference value, interested friends can refer to, I hope you can learn a lot after reading this article, the following let Xiaobian take you to understand.

According to CSS, the child element inherits attributes from the parent element. However, it doesn't always work this way. Take a look at the following rule:

Body {font-family: Verdana, sans-serif;}

Following the above rule, the body element of the site will use the Verdana font (if the font is available in the interviewer's system).

Through CSS, child elements inherit the attributes owned by the highest level elements (in this case, body) (these child elements such as p, td, ul, ol, ul, li, dl, dt, and dd). There is no need for the rest of the rules, all child elements of body should display Verdana fonts, and the child elements of child elements should be different. And in a small number of ancient browsers, this is indeed the case.

However, in the bloody age of browser wars, this situation may not necessarily get angry, and the current approval of standards is not a priority for enterprises. Netscape 4, for example, does not approve of inheritance, which not only neglects inheritance, but also ignores the delimitation of body elements. IE/Windows has relevant headings up to IE6, and the font names in the table will be ignored.

Thank you for reading this article carefully. I hope the article "css how to use Verdana fonts for the body elements of the site" shared by the editor will be helpful to everyone. At the same time, I also hope that you will support and pay attention to the industry information channel. More related knowledge is waiting for you to learn!

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