【发布时间】:2018-03-19 14:34:34
【问题描述】:
试图弄清楚如何使用下划线。之前,为了让不同屏幕的排版响应字体,我通常会编写不同的媒体查询如下:
@media screen and (min-width: 480px) {
html{
font-size: 18px;
}
h1 {
font-size: 2rem;
}
h2 {
font-size: 1rem;
}
etc..
}
@media screen and (min-width: 700px) {
html{
font-size: 14px;
}
h1 {
font-size: 0.5rem;
}
h2 {
font-size: 1.3rem;
}
etc..
}
如何使用下划线更改父字体大小,以便子元素可以具有rem 大小?
我尝试添加字体大小,因为它似乎是父元素 (?)
/*--------------------------------------------------------------
# Typography
--------------------------------------------------------------*/
body,
button,
input,
select,
optgroup,
textarea {
color: #404040;
font-family: Merriweather, sans-serif;
font-size:20px;
font-size: 1rem;
line-height: 1.5;
color:red;
}
最好的方法是什么?
【问题讨论】:
标签: html css wordpress responsive typography