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
dig - DNS lookup utility When a domain name acces...
Table of contents About FastDFS 1. Search for ima...
Mysql is a mainstream open source relational data...
Official documentation: So mysql should be starte...
Preface Share two methods to monitor whether an e...
Today someone talked to me about a website develo...
Table of contents Preface: Kind tips: variable 1....
1. What is Docker Secret 1. Scenario display We k...
Here are some tips from training institutions and...
Preface: As a giant in the IT industry, Microsoft...
1. Download, install and activate CLion Just foll...
Adding a network interface to the container 1 Run...
I have been learning about algorithms recently an...
The following error occurs when entering Chinese ...
The file server is one of the most commonly used ...