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 shares the specific code for JavaScr...
Ubuntu16.04 install and uninstall pip Experimenta...
Table of contents 1. Introduction to ReactJS 2. U...
1. Links Hypertext links are very important in HTM...
1. Nested routing is also called sub-routing. In ...
First create a directory cd /etc/nginx mkdir ssl ...
Table of contents 1. Preparation 2. Writing comma...
Hexo binds a custom domain name to GitHub under W...
How to solve the problem of being unable to acces...
Preface: Mybatis special character processing, pr...
[mysql] replace usage (replace part of the conten...
background The Agile model is widely used, and te...
These introduced HTML tags do not necessarily ful...
Table of contents getting Started Data storage Co...
1 Question The company's server uses Apache, ...