Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/83.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 某些链接在css样式设置后不显示粗体,以使字母加粗_Html_Css_Styling - Fatal编程技术网

Html 某些链接在css样式设置后不显示粗体,以使字母加粗

Html 某些链接在css样式设置后不显示粗体,以使字母加粗,html,css,styling,Html,Css,Styling,我有这个css: .content .chapter_text li a { color: #7e9940; text-decoration: none; font-weight: bold; } 在同一页上,它有工作的地方,也有不工作的地方 请看这里:-在页面底部,链接以粗体文本显示。在页面的中间,链接出现在非粗体文本中。 但就我所知,它们的样式是一样的。你知道主页中间的链接为什么不会显得粗大吗? 谢谢 > P>页面中间的链接不是Li元素的子元素,这是选择器的目标。

我有这个css:

.content .chapter_text li a 
{
    color: #7e9940;
    text-decoration: none;
    font-weight: bold;
}
在同一页上,它有工作的地方,也有不工作的地方

请看这里:-在页面底部,链接以粗体文本显示。在页面的中间,链接出现在非粗体文本中。 但就我所知,它们的样式是一样的。你知道主页中间的链接为什么不会显得粗大吗?
谢谢

> P>页面中间的链接不是Li元素的子元素,这是选择器的目标。

页面中间的链接不是Li元素的子元素,这是选择器的目标。

它们不包含在Li元素中,因此样式不适用。你必须把它们移到一个li中,或者让它像一个li

.content .chapter_text li a, .content .chapter_text p a {    
    color: #7e9940;    text-decoration: none;    font-weight: bold;
}

它们不包含在li元素中,因此样式不适用。你必须把它们移到一个li中,或者让它像一个li

.content .chapter_text li a, .content .chapter_text p a {    
    color: #7e9940;    text-decoration: none;    font-weight: bold;
}

这是因为中间的链接不是在一个li中。您可以将CSS修改为以下内容以获得想要的结果:

.content .chapter_text a 
{
    color: #7e9940;
    text-decoration: none;
    font-weight: bold;
}

这是因为中间的链接不是在一个li中。您可以将CSS修改为以下内容以获得想要的结果:

.content .chapter_text a 
{
    color: #7e9940;
    text-decoration: none;
    font-weight: bold;
}