Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
446 views
in Technique[技术] by (71.8m points)

css - How to specify font attributes for all elements on an html web page?

When I set the font family, font size, color etc. it seems that some nested elements override these with ugly browser defaults.

Must I really specify those a dozens of times for any kind of element on my page, or is there a way to set them globally once and forever?

How to do that?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
* {
 font-size: 100%;
 font-family: Arial;
}

The asterisk implies all elements.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...