3个回答
展开全部
<!DOCTYPE HTML>
<html>
<head>
<meta charset="UTF-8">
<title>CSS3 Demo</title>
<style type="text/css">
#box { width: 10em; padding: 15px; font-size: 1em;}
#box2 { font-size: 4vw;}
</style>
</head>
<body>
<div id="box">
Nihao a 你好 啊啊 啊啊 哈牛粪打款三幅画
</div>
<div id="box2">
我们都是好孩子啊啊2
</div>
<script type="text/javascript">
window.onresize = function(){
var box2 = document.getElementById("box2");
box2.style["z-index"] = 1;
}
</script>
</body>
</html>
展开全部
你在CSS页面最上上端写这个
/* ===================================================================
11px = 85% 12px = 93% 13px = 100% 14px = 108%
15px = 116% 16px = 123.1% 17px = 131% 18px = 138.5%
19px = 146.5% 20px = 153.9% 21px = 161.6% 22px = 167%
23px = 174% 24px = 182% 25px = 189% 26px = 197%
=================================================================== */
之后便是字体大小的时候用%就行 这样的话浏览器页面缩小时字体也跟着小了
/* ===================================================================
11px = 85% 12px = 93% 13px = 100% 14px = 108%
15px = 116% 16px = 123.1% 17px = 131% 18px = 138.5%
19px = 146.5% 20px = 153.9% 21px = 161.6% 22px = 167%
23px = 174% 24px = 182% 25px = 189% 26px = 197%
=================================================================== */
之后便是字体大小的时候用%就行 这样的话浏览器页面缩小时字体也跟着小了
本回答被提问者和网友采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
浏览器自带缩放功能,Ctrl +
使用HTML CSS没办法。用SVG
使用HTML CSS没办法。用SVG
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询