问题描述
我尝试设置表格单元格的字体大小,但它不工作。我试图在css中设置大小:
I'm trying to set the font size of a table cell, but its not working. I've tried to set size in the css:
.myclass {
font-size: 10px;
}
它不工作。我尝试将其更改为相对大小:
It didn't work. I tried to change it to a relative size:
.myclass {
font-size: 0.8em;
}
但它没有工作。当我使用google chrome开发工具查看元素时,font-size标签在那里,但被击出,并在它旁边有一个黄色的感叹号。有人知道这是什么意思,如何设置字体大小?
But it didn't worked either. When i looked at the element using google chrome Developer tools, the font-size tag was there, but was striked out and has a yellow exclamation mark next to it. Does anybody know what it means and how can i set the font size ?
推荐答案
如果您使用更具体的选择器来设置字体,则较不具体的选择器将不起作用。尝试从一般规则开始,并使用后面的细节。
If you used a more specific selector to set the font before, the less specific selector won't work. Try to begin with general rules and use the specifics after them.
这篇关于浏览器中忽略字体大小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!