13

以下のコードのタグのフォントサイズを変更できません

<td valign="top" width="620"><strong><a href="images/pub/pub1.pdf" target="_self">Factsheet of the OSCE Border Management Staff College</a></strong><br /><br /><strong><span style="font-size: 11px; color: #aaaaaa;">14 June 2013</span></strong>

試した:

<td valign="top" width="620"><strong><a style="font-size:14px;" href="images/pub/pub1.pdf" target="_self">Factsheet of the OSCE Border Management Staff College</a></strong><br /><br /><strong><span style="font-size: 11px; color: #aaaaaa;">14 June 2013</span></strong>

何も変わっていません;

<td valign="top" width="620"><strong><a class="pub" href="images/pub/pub1.pdf" target="_self">Factsheet of the OSCE Border Management Staff College</a></strong><br /><br /><strong><span style="font-size: 11px; color: #aaaaaa;">14 June 2013</span></strong>

a.pub
{
font-size: 14px;
}

変更なし。

<td class="pub" valign="top" width="620"><strong><a  href="images/pub/pub1.pdf" target="_self">Factsheet of the OSCE Border Management Staff College</a></strong><br /><br /><strong><span style="font-size: 11px; color: #aaaaaa;">14 June 2013</span></strong>

td.pub
{
font-size: 14px;
}

効果なし; style.css ファイルのタグのフォントを使用しています。このタグだけの font-size を変更したいです。私が間違っていることはありますか?

4

3 に答える 3

32

inline styles最も具体的であるように、変更されないのは奇妙です。スタイルシートが!important宣言されている場合、上書きされません。これを試してください

<span style="font-size: 11px !important; color: #aaaaaa;">Hello</span>
于 2013-06-15T08:04:14.830 に答える
1

この属性をスタイルで使用する

font-size: 11px !important;//your font size

!importantにより、CSS をオーバーライドします

于 2013-06-15T08:05:36.433 に答える