gpt4 book ai didi

html - 字体未使用 rems 调整大小

转载 作者:行者123 更新时间:2023-11-28 16:25:37 28 4
gpt4 key购买 nike

它应该很简单,但无论出于何种原因,rem 都不适合我。

比如我有

    <div id="big_paragraph">
<p>I will make sure you get upvoted,</p>
<p>if you answer this simple question</p>
<p>for me. Thanks!</p>
</div><!-- big_paragraph -->

我希望字体大小能够响应,所以在我的 CSS 中有

* {
margin:0;
padding:0;
border:none;
}

html{
font-size: 62.5%;
/* I also tried font-size: 16px; to no avail */
}

body{
font-family: 'Muli', sans-serif;
}

#big_paragraph{
margin-top:101px;
font-size: 4.1rem;/*41px*/
text-align:center;
}

我不知道这是否重要,但我的 html 的头部部分也有以下内容

<meta name="viewport" content="width=device-width, initial-scale=1.0">

最佳答案

这应该可行,但可能只适用于现代浏览器。

.some-paragraph{
font-size: 5vw !important;
}

关于html - 字体未使用 rems 调整大小,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45335625/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com