のようなhtml形式のテキストを含むdivがありますnormal, <b>bold</b>, <i>italic</i>
。そして、その div でのみすべての太字テキストの font-size を変更する必要があります。
問題は、html/css、または js でこれを行う方法です。
div.foo b, div.foo strong {
font-size: 1.2em
}
ケースのようなインラインスタイルを使用している<i style="font-weight:bold">
場合は、より複雑になります。
次に、jQuery + CSS を使用する必要があります
$('div.foo *[style=font-weight:bold]').addClass('myFontSize');
div.foo .myFontSize {
font-size: 1.2em;
}
しかし、それは良い習慣ではないことに注意してください。
div#divid b { font-size: 18px; }
要素セレクターを次のように使用できます。
#divId b
{
font-size:1.1em;
//what ever you want also
}