p や p.latest_news など、ページ内の多くの要素のフォント サイズと行の高さを変更する jQuery 関数があります。この関数は、p.latest_news を除く他のすべての要素で期待どおりに機能します。
p.latest_news に適用される font-size と line-height は、p no クラス (つまり$('p').css({...
)と同じです。
jQuery.1.7.1
コード
$('p.article_news').css({
'font-size' : Math.max(11,(.9 * newFontSize)),
'line-height' : Math.max(13,(1.1 * newFontSize))+'px'
});
$('p').css({
'font-size' : Math.max(14,newFontSize),
'line-height' : Math.max(21,(1.7 * newFontSize))+'px'
});
私が使うだけなら
$('p.article_news').css({
'font-size' : Math.max(11,(.9 * newFontSize)),
'line-height' : Math.max(13,(1.1 * newFontSize))+'px'
});
p.article_news font-size と line-height が期待どおりに変更されました
なぜこうなった?各 p、class、および classless にどのように影響を与えることができますか?
ありがとうございました