我有以下的DIV:如何在不同的屏幕尺寸用百分比字体
<div class="tckLeftHolder">
<div class="tckLeftContents">
<span>URGENT CARE WAIT</span>
</div>
</div>
CSS:
.tckLeftContents
{
text-align: center;
width: 90%;
padding: 0 0 0 10%;
height: 35px;
overflow: hidden;
}
.tckLeftHolder
{
float: left;
width: 25%;
height: 35px;
line-height: 17px;
vertical-align: middle;
background: #EA7C30;
border-top-left-radius: 10px;
border-bottom-left-radius: 10px;
color: #FFFFFF;
font-family: Verdana;
font-size: 10px;
overflow: hidden;
text-align: center;
box-shadow: inset 0 -1px 1px rgba(0,0,0,0.5), inset 0 1px 1px rgba(238,146,85,1);
}
中显示此不同的屏幕尺寸:
如何使字体响应,以便基于s的大小增加/减少creen。
更新:
CSS:
@media (min-width: 500px) and (max-width: 860px)
{
.tckLeftContents
{
font-size: 1vmin;
}
}
我更新了我的问题,我看到... – SearchForKnowledge 2014-10-07 16:05:00
它变得soooooo微小。我想知道为什么:/ – SearchForKnowledge 2014-10-07 16:09:19
增加价值,这是一个百分比...像“3vmin”或“10vmin”。即使十进制值'5.85vmin' – LcSalazar 2014-10-07 16:13:49