为什么我不能更改标签的字体大小?
我有一点小问题,不知道为什么它不起作用。我试图改变标签标签的字体大小,但我不能设置小于10px。为什么?
为什么我不能更改标签的字体大小?
.group {
margin-bottom: 20px;
}
.group label {
font-size: 10px;
}
.group2 label {
font-size: 8px;
}
<div class="group">
<label for="input1">First label</label>
<input type="text" name="input1">
</div>
<div class="group group2">
<label for="input2">Second label</label>
<input type="text" name="input2">
</div>
编辑:原来缓存CSS在歌剧负责非更新的造型。
按需要工作。请记住在进行更改后重新运行代码片段。
.group {
margin-bottom: 20px;
}
.group label {
font-size: 10px;
}
.group2 label {
font-size: 4px;
}
<div class="group">
<label for="input1">First label</label>
<input type="text" name="input1">
</div>
<div class="group group2">
<label for="input2">Second label</label>
<input type="text" name="input2">
</div>
嗯,但我没有看到10px和4px之间的任何区别,请使用代码演示来查看屏幕:http://i.imgur.com/popRTSw.png – Jakub
我确实看到了区别。 http://imgur.com/wIuCnRd –
你在哪个浏览器上运行它?也许,试着清除浏览器的缓存?它应该工作得很好。 –
它在代码段中工作正常.. –
如果您使用的是Chrome,您可能需要使用以下命令来硬刷新浏览器:mac上的Cmd/Shift/R和Windows上的Cntrl/Shift/R。由于Chrome缓存页面,您的更改可能还不可见 – Christophvh
我正在使用Opera和网站位于本地主机上。 – Jakub