我在我的代码中有这一行:
<label style="font-weight: bold" for="sedii18n_codice_paese_indirizzo">Codice paese indirizzo</label>
但标签显示正常。 如果我进入Chrome Inspector,我可以看到这个:
font-weight: normal !important;
如果我在检查器中更改font-weight
,则字体的粗细会正常修改。
我在我的代码中有这一行:
<label style="font-weight: bold" for="sedii18n_codice_paese_indirizzo">Codice paese indirizzo</label>
font-weight: normal !important;
如果我在检查器中更改font-weight
,则字体的粗细会正常修改。
看起来好像有其他的东西覆盖了你的加粗样式,因此要使用!important标签。Chrome检查器应该会告诉你在哪里应用了font-weight: normal !important;
。你可以尝试在你的样式属性中添加font-weight: bold !important;
来覆盖这个覆盖。
font-weight: normal !important;
的原因,并查看是否可以将其删除。 - Matt Sach