How is Line-height inherited?
Core code demonstration: initialization <style> body{ font-size: 20px; } p { background-color: #ccc; font-size: 16px; } </style> </head> <body> <p>This is a line of text</p> </body> Write specific values body{ font-size: 20px; line-height: 50px; } p { background-color: #ccc; font-size: 16px; } Write ratio body{ font-size: 20px; line-height: 1.5; } p { background-color: #ccc; font-size: 16px; } Write the percentage first and then inherit! body{ font-size: 20px; line-height: 200%; } p { background-color: #ccc; font-size: 16px; } This is the end of this article about how to inherit CSS line-height. For more information about CSS line-height inheritance, please search previous articles on 123WORDPRESS.COM or continue to browse the related articles below. I hope you will support 123WORDPRESS.COM in the future! |
<<: How to generate mysql primary key id (self-increment, unique and irregular)
>>: Table td picture horizontally and vertically centered code
This article example shares the specific code for...
When installing Docker on Windows 10, after selec...
Table of contents 1. Mutex 1. Initialization of m...
Preface I recently installed MySQL 5.7 and found ...
HTML+CSS 1. Understanding and knowledge of WEB st...
How to indicate the parent directory ../ represent...
Why mention textarea specifically? Because the tex...
I believe everyone is familiar with database inde...
First of all, we need to know what a state manage...
Table of contents Document Object Model (DOM) DOM...
The purpose of using HTML to mark up content is t...
Refer to the official documentation here for oper...
Sometimes we may encounter such a requirement, th...
1. Compile and install ovs from source code: Inst...
need: According to business requirements, it is n...