Get the App
SLTechnology News&Howtos  ›  Development  › 

How CSS makes fonts inherited by all child elements

Shulou Source: shulou.com Published: 2022-06-01 05:04:51 10月03日 Update

This article mainly introduces how CSS allows fonts to be inherited by all child elements of the relevant knowledge, the content is detailed and easy to understand, simple and fast operation, with a certain reference value, I believe you read this CSS how to make fonts inherited by all child elements of the article will have a harvest, let's take a look at it.

The "Verdana, sans-serif" font is held by all the child elements, so what should I do? For example, the font of your desired paragraph is Times. No title. Create a special rule for p, how it will get rid of the delimitation of the parent element:

Body {font-family: Verdana, sans-serif;} td, ul, ol, ul, li, dl, dt, dd {font-family: Verdana, sans-serif;} p {font-family: Times, "Times New Roman", serif;} this article on "how CSS makes fonts inherited by all child elements" ends here. Thank you for reading! I believe you all have a certain understanding of "how CSS makes fonts inherited by all child elements". If you want to learn more, you are welcome to follow the industry information channel.

Tags: Elements fonts knowledge content articles value easy to operate articles easy to understand more headings paragraphs for example read industry rules information information channels channels learning Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Xiaomi Shulou Information Shulou Technology Docker MySQL