font-size
,接下来你将设置 font-weight
。
font-weight
属性用于设置文本中所用的字体的粗细。
h1
标签的 font-weight
为 800。h2
标签的 font-weight
为 600。h3
标签的 font-weight
为 500。h4
标签的 font-weight
为 400。h5
标签的 font-weight
为 300。h6
标签的 font-weight
为 200。h1
标签的 font-weight
为 800。'
testString: assert($('h1').css('font-weight') == '800', '你应该设置 h1
标签的 font-weight
为 800。');
- text: '你应该设置 h2
标签的 font-weight
为 600。'
testString: assert($('h2').css('font-weight') == '600', '你应该设置 h2
标签的 font-weight
为 600。');
- text: '你应该设置 h3
标签的 font-weight
为 500。'
testString: assert($('h3').css('font-weight') == '500', '你应该设置 h3
标签的 font-weight
为 500。');
- text: '你应该设置 h4
标签的 font-weight
为 400。'
testString: assert($('h4').css('font-weight') == '400', '你应该设置 h4
标签的 font-weight
为 400。');
- text: '你应该设置 h5
标签的 font-weight
为 300。'
testString: assert($('h5').css('font-weight') == '300', '你应该设置 h5
标签的 font-weight
为 300。');
- text: '你应该设置 h6
标签的 font-weight
为 200。'
testString: assert($('h6').css('font-weight') == '200', '你应该设置 h6
标签的 font-weight
为 200。');
```