如题 根据电脑分辨率html字体变化
1 回答

赫本女神
TA贡献35条经验 获得超33个赞
算了自己答吧 不是js方法
<p>阿卡家伙大哥打</p>
p {
font-size: 50px;
}
@media (max-width: 1000px) {
p {
font-size: 30px;
}
}
@media (max-width: 800px) {
p {
font-size: 24px;
}
}
@media (max-width: 600px) {
p {
font-size: 18px;
}
}
@media (max-width: 400px) {
p {
font-size: 14px;
}
}
添加回答
举报
0/150
提交
取消