css - anchor 链接有白色边框或空格

标签 css

我正在尝试在我的元素中制作一个带有倾斜末端的菜单和带有三 Angular 形末端的按钮。但我最终在 Firefox 和 IE 中遇到了一些空白。

我已经获取了您可以在此页面上看到的代码:

SOURCE

enter image description here

enter image description here

但在 chrome 中没有这样的空间,看起来还不错。

enter image description here

我的作品可以在这个网站上看到:

thejobupdates.com/pt/devos

请帮我删除不需要的白色间距。

我还有一个 FIDDLE在这里供大家编辑。

CSS:

     #heroTab li > a {
            text-decoration: none;
            display: block;
            position: relative;
            line-height: 52px;
            padding: 0 8px;
            color:#fff; 
            text-transform:uppercase;
            font-family:'open_sansregular', sans-serif;
            font-size:15px;
            margin-top: 10px;
            background: #243276;
        }
    #heroTab li > a:after {
        content: '';
        position: absolute;
        border: 26px solid #243276; 
        border-right-color: transparent;
        border-top-color: transparent;
        left: 100%;
        top: 0;
    }
#heroTab li > a:before {
    content: '';
    position: absolute;
    border: 26px solid #243276; 
    border-left-color: transparent;
    border-bottom-color: transparent;
    right: 100%;
    top: 0;
}

感谢您的帮助。

最佳答案

您可以将选项卡上的左/右边距更改为 -1px,例如

#heroTab li > a {
...
    margin:10px -1px;
...
}

这将弥补明显的差距。我认为这是 Angular 渲染问题,所以你必须将它们重叠 1px 才能摆脱它。参见 here .

关于css - anchor 链接有白色边框或空格,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33939565/

相关文章:

css - Twitter Bootstrap 横向插入符号

jquery - 从多个 li 中选择同一个 child

CSS 100% 高度带填充/边距

html - 下拉菜单显示不正确

css - 在reactJS中悬停时更改父组件背景

javascript - 无法获取右侧选项卡内容

html - 减少 HTML 文本上方和下方的空白

html - 祖先表类影响后继表元素

html - 更多元素在一个div中的相对位置

css - 如何将自定义 css 添加到 Sharepoint 应用程序 (iframe)