Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/82.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Html 为什么<;b>;及<;i>;不工作?_Html_Css_Css Reset - Fatal编程技术网

Html 为什么<;b>;及<;i>;不工作?

Html 为什么<;b>;及<;i>;不工作?,html,css,css-reset,Html,Css,Css Reset,我有这个网站 文中 Korsholm Jagtrejser是一位年轻人,他一直在等待udvalg空军的到来 贾格兰德 Korsholm的周围有,jagtrejser的周围有,但它没有显示为粗体/斜体。我正在使用meyerweb重置css,它有一个和 我的chrome检查员没有说它不应该是大胆的 有人能指出问题吗?因为样式表有font:inherit覆盖浏览器的CSS: html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h

我有这个网站

文中

Korsholm Jagtrejser是一位年轻人,他一直在等待udvalg空军的到来 贾格兰德

Korsholm的周围有
,jagtrejser的周围有
,但它没有显示为粗体/斜体。我正在使用meyerweb重置css,它有一个

我的chrome检查员没有说它不应该是大胆的

有人能指出问题吗?

因为样式表有
font:inherit覆盖浏览器的CSS:

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: inherit; font-size: 100%; vertical-align: baseline;}

重置样式表有
font:inherit
与一个选择器相对应,该选择器匹配许多不同的内容,包括
b
i
。包括
font-weight
font-style
,因此它将这些设置为父元素的值。

您将第19行reset.css中的
b
标记的“font”设置为
inherit
。删除b标记或为其添加新的选择器以更改字体大小。

使用CSS重置时,它会重置所有样式。现在需要使用CSS取消设置。我建议使用

完整代码如下所示:

/**
 * Start Vanilla CSS 1.0.2 
 */ 
body {
    font: 9pt/1.5em sans-serif;
}
pre, code, tt {
    font: 1em/1.5em 'Andale Mono', 'Lucida Console', monospace;
}
h1, h2, h3, h4, h5, h6, b, strong {
    font-weight: bold;
}
em, i, dfn {
    font-style: italic;
}
dfn {
    font-weight:bold;
}
p, code, pre, kbd {
    margin:0 0 1.5em 0;
}
blockquote {
    margin:0 1.5em 1.5em 1.5em;
}
cite {
    font-style: italic;
}
li ul, li ol {
    margin:0 1.5em;
}
ul, ol {
    margin:0 1.5em 1.5em 1.5em;
}
ul {
    list-style-type:disc;
}
ol {
    list-style-type:decimal;
}
ol ol {
    list-style: upper-alpha;
}
ol ol ol {
    list-style: lower-roman;
}
ol ol ol ol {
    list-style: lower-alpha;
}
dl {
    margin:0 0 1.5em 0;
}
dl dt {
    font-weight:bold;
}
dd {
    margin-left:1.5em;
}
table {
    margin-bottom:1.4em;
    width:100%;
}
th {
    font-weight:bold;
}
th, td, caption {
    padding:4px 10px 4px 5px;
}
tfoot {
    font-style:italic;
}
sup, sub {
    line-height:0;
}
abbr, acronym {
    border-bottom: 1px dotted;
}
address {
    margin:0 0 1.5em;
    font-style:italic;
}
del {
    text-decoration: line-through;
}
pre {
    margin:1.5em 0;
    white-space:pre;
}
img.centered, .aligncenter, div.aligncenter {
    display: block;
    margin-left: auto;
    margin-right: auto;
}
img.alignright {
    display: inline;
}
img.alignleft {
    display: inline;
}
.alignright {
    float: right;
    margin-left: 10px;
}
.alignleft {
    float: left;
    margin-right: 10px;
}
img {
    max-width: 100%;
}
* html .clearfix {
    height: 1%;
}
* + html .clearfix {
    display: inline-block;
}
.clearfix:after {
    content: ".";
    display: block;
    height: 0;
    clear: both;
    visibility: hidden;
}
* html .group {
    height: 1%;
}
* + html .group {
    display: inline-block;
}
.group:after {
    content: ".";
    display: block;
    height: 0;
    clear: both;
    visibility: hidden;
}
/**
* End Vanilla CSS
*/

好的是,你可以使用任何你需要的和你不需要的。

PostCode?与CSS重置有关的任何事情都可能会影响你的元标记使用规范化而不是重置。我无法理解CSS重置究竟为什么会决定这样做。你不明白“重置”的哪一部分?reset.css的目的是将所有内容重置为不做任何事情,以便您可以添加自己的样式。坦率地说,现在IE7基本上已经过时,css重置似乎基本上是多余的-浏览器基本上是兼容的。很好的捕获,@AlienWebguy-解释了您的27.4k声誉:)顺便说一句,这种垂直对齐重置非常。。。我知道刚刚添加了
b,strong{font-weight:bold!important;}
I,em{font-style:italic!important;}
但这根本不起作用(尝试了important,只是想看看它是否改变了什么)-这是在重置之后这实际上是唯一起作用的事情,请从重置中删除它。很高兴听到这个消息。出于这样的原因,我倾向于使用非常小的重置(如果有的话)。