CSS:我无法看到导致此下划线的原因

时间:2017-01-18 02:18:42

标签: css

this site上,下面有一行"营销机构弗里曼特尔"。

enter image description here

我使用过Chrome Code Inspector但无法找到导致此问题的原因。

我想删除该行。感谢。

3 个答案:

答案 0 :(得分:1)

:after的{​​{1}}伪元素导致下划线。

答案 1 :(得分:1)

这是CSS规则:

body.home h2::after {
    content: '';
    width: 60px;
    height: 1px;
    background-color: #4a2e69;
    position: absolute;
    bottom: -5px;
    margin: 0 auto;
    left: 0;
    right: 0;
}

您可以将其删除或(如果您不能这样做)添加以下内容以将高度设置为0并使其不可见:

body.home h2::after {
        height: 1px !important;
}

答案 2 :(得分:0)

在你的h2标签之后有:

enter image description here

相关问题