0

嗨,我正在尝试使用一些简单的内联样式,但粗体不起作用。我正在使用 CSS 重置。有谁知道为什么?

HTML:

<p class="line10"><b>Guidance Resources:</b> Call 888-999-6768.</p>

CSS:

.line10 {
    line-height:20px;
}

这是 CSS 重置代码.......................... ...................................................

/*------------------------------------*\
    RESET
\*------------------------------------*/
/* http://meyerweb.com/eric/tools/css/reset/ 
    v2.0b1 | 201101 
    NOTE:WORK IN PROGRESS
    USE WITH CAUTION AND TEST WITH ABANDON */

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,figcaption,figure,
footer,header,hgroup,menu,nav,section,summary,
time,mark,audio,video{
    margin:0;
    padding:0;
    border:0;
    outline:0;
    font-size:100%;
    font:inherit;
    vertical-align:baseline;
    text-decoration:none;
}
/* HTML5 display-role reset for older browsers */
article,aside,details,figcaption,figure,
footer,header,hgroup,menu,nav,section{
    display:block;
}
body{
    line-height:1;
}
ol,ul{
    /*list-style:none;*/
}
blockquote,q{
    quotes:none;
}
blockquote:before,blockquote:after,
q:before,q:after{
    content:’’;
    content:none;
}
/* remember to define visible focus styles! 
:focus{
    outline:?????;
} */

/* remember to highlight inserts somehow! */
ins{
    text-decoration:none;
}
del{
    text-decoration:line-through;
}

table{
    border-collapse:collapse;
    border-spacing:0;
}
4

2 回答 2

1

重置您的 CSS 重置:

b, strong {
  font-weight: bold;
}

确保在重置后插入您的样式表。

于 2013-06-03T15:37:20.150 回答
0

所以这是由

font: inherit;

覆盖font-weight. 您可以删除它或手动重置标签所需的样式<b>

我还建议使用Normalize.css而不是笨拙的重置。

于 2013-06-03T15:40:14.560 回答