0

What is inherit?

What is inherit, how to use, what's different between normal and inherit, give one example with explaination of inherit font variant?

2nd Apr 2020, 3:40 AM
Jitendra Kumar
Jitendra Kumar - avatar
6 Respostas
+ 1
Lets say for example you have a <div> (parent element) in your page to define a section, and in it you have so many elements like p, h1, section amd many more, and you have styled your div to have a font-size of 10 px and you want the elements in it to have the same size (child elements), instead of repeating font-size to be 10px, you just set the value to be inherit. The childe elements take the characteristics of the parent, they inherit them. Happy coding 😊 keep coding 🙏
2nd Apr 2020, 5:13 AM
Alfred Juma
Alfred Juma - avatar
+ 1
OK its use for second time Both are same normal and inherit
2nd Apr 2020, 5:16 AM
Jitendra Kumar
Jitendra Kumar - avatar
+ 1
It's use for child element
2nd Apr 2020, 5:16 AM
Jitendra Kumar
Jitendra Kumar - avatar
+ 1
Yep, they are for child elements
2nd Apr 2020, 5:17 AM
Alfred Juma
Alfred Juma - avatar
+ 1
Thanks Alfred juma
2nd Apr 2020, 5:21 AM
Jitendra Kumar
Jitendra Kumar - avatar
+ 1
Anytime
2nd Apr 2020, 9:14 AM
Alfred Juma
Alfred Juma - avatar