gpt4 book ai didi

css - 如何让大众字体停止增长

转载 作者:太空宇宙 更新时间:2023-11-03 22:14:32 26 4
gpt4 key购买 nike

我正在尝试创建一个响应式网页,其中 html 的最大宽度为 1000 像素。我所有的字体都是根据 vw 指定的。当浏览器扩展到超过 1000 像素时,有没有办法阻止字体变大?

最佳答案

您可以使用@media 规则:

.text-class {
font-size: 0.2vw;
}

@media only screen and (min-width: 1000px) {
.text-class {
font-size: /* some fixed size */;
}
}

关于css - 如何让大众字体停止增长,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57486793/

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