div怎么在css中设置字体⼤⼩,根据div⼤⼩调整字体⼤⼩它由9个框组成,中间带有⽂本。我已经制作了框,以便它们可以随着屏幕⼤⼩的变化⽽调整⼤⼩,以便始终保持在同⼀位置。
但是,即使我使⽤百分⽐,⽂本也不会调整⼤⼩。
如何调整⽂本的⼤⼩,使其在整个页⾯上始终具有相同的⽐例?
这是处理多种分辨率的合适解决⽅案吗?还是我应该@media在CSS中进⾏很多检查并为每种媒体类型设置许多布局?
```
html,
css怎么创建body {
height: 100%;
width: 100%;
}
#launchmain {
width: 55%;
display: inline-block;
position: relative;
top: 10%;
left: 25%;
}
#launchmain:after {
padding-top: 79.26%;
display: block;
content: '';
margin-top: 10px;
}
#box1 {
border: 1px solid #000000;
position: absolute;
width: 25.37%;
height: 21.88%
}
#box2 {
border: 1px solid #000000;
width: 48.48%;
height: 21.88%;
position: absolute;
left: 25.64%
}
#box3 {
border: 1px solid #000000; width: 25.37%;
height: 21.88%;
position: absolute;
left: 74.39%;
}
#box4 {
border: 1px solid #000000; width: 33.235%;
height: 53.84%;
position: absolute;
top: 22.07%;
}
#maininvite {
border: 1px solid #000000; width: 33.53%;
height: 53.84%;
position: absolute;
top: 22.07%;
left: 33.235%;
}
#box6 {
border: 1px solid #000000; width: 33.235%;
height: 53.84%;
position: absolute;
top: 22.07%;
left: 66.765%;
}
#box7 {
border: 1px solid #000000;
width: 25.37%;
height: 21.88%;
position: absolute;
top: 76.2%;
}
#box8 {
border: 1px solid #000000;
width: 48.48%;
height: 21.88%;
position: absolute;
left: 25.64%;
top: 76.2%;
}
#box9 {
border: 1px solid #000000;
width: 25.37%;
height: 21.88%;
position: absolute;
top: 76.2%;
left: 74.39%;
}
#maininvite h2 {
font-size: 180%;
}
p {
position: relative;
font-size: 80%;
}
header
not a lot of text here but still overflowing ```

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。