Tom*_*len 9 html css html5 google-font-api
<span class="bold">Some Title</span>
Run Code Online (Sandbox Code Playgroud)
.bold
{
font-weight:bold;
}
Run Code Online (Sandbox Code Playgroud)
这大胆地呈现,但是:
<strong>Some Title</strong>
Run Code Online (Sandbox Code Playgroud)
才不是.它只是呈现为常规文本.我使用的是HTML5 doctype和Google字体:
<link href='http://fonts.googleapis.com/css?family=Droid+Sans&v2' rel='stylesheet' type='text/css'>
Run Code Online (Sandbox Code Playgroud)
有没有人经历过这个?
编辑:BoltClock建议它可能是CSS重置,这里是块的 <strong>
/** CSS Reset **/
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed,
figure, figcaption, footer, header, hgroup,
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
margin: 0;
padding: 0;
border: 0;
font-size: 100%;
font: inherit;
vertical-align: baseline;
}
Run Code Online (Sandbox Code Playgroud)
Bol*_*ock 38
如果没有别的strong,那就是你的问题(或者更确切地说,CSS重置的问题).
该font: inherit样式与所有这些选择器一起,要求所有内容都从其父级继承每种字体样式.显然,默认权重是,normal因此strong在重新声明之前,文本不再是粗体:
strong { font-weight: bold; }
Run Code Online (Sandbox Code Playgroud)
(其他一些明显的要素重置风格b,em,i,码元,报价元素,表格,标题,列表等)