Change CSS "bold" property font-weight value

Aug*_*ger 2 css twitter-bootstrap

The question is pretty straightforward.

I use Bootstrap, where all the bold things are CSSized in

tag {
  font-weight: bold;
}
Run Code Online (Sandbox Code Playgroud)

but I use Open Sans (as so many people), where font-weight: 400 is not enough and font-weight: 700 is much better.

Is there a way I tell my CSS that bold=700 and not 400 (which is I reckon the default value) ?

=====

EDIT

I must have been unclear.

In CSS only, without modifying Bootstrap sources, there are many locations (the whole list here) where bootstrap says (Eg.)

h6 {
  font-weight: bold
}
Run Code Online (Sandbox Code Playgroud)

I'd like the web-browser to understand that in this case bold should be equivalent to font-weight: 700 instead of font-weight: 400 as per default without rewriting all the rules (Eg.)

h6 {
  font-weight: 700
}
Run Code Online (Sandbox Code Playgroud)

答案可能是目前还不可能,但谷歌还没有给我任何答案。

Kam*_*ami 5

如果您正在使用该strong标签。

strong {
    font-weight: 700;
}
Run Code Online (Sandbox Code Playgroud)

或者如果您使用 使元素加粗font-weight:bold,为什么不呢

elem {
    font-weight: 700;
}
Run Code Online (Sandbox Code Playgroud)

注意:正如@Pavlo 指出的,粗体相当于 700。

  • 实际上“bold”相当于“700”:https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight#Values (2认同)