【问题标题】:How to remove the bottom border of the selected tab in chrome using css如何使用css在chrome中删除选定选项卡的底部边框
【发布时间】:2014-10-29 05:01:36
【问题描述】:

在 Internet Explorer 中,我们得到一条直线。在 chrome 中,我们得到扭曲的线条,其余所有浏览器都有所需的情况。如第一张图片所示。请告诉一些代码来实现这一点,因为我非常需要它。这是代码:

ul#tabs li a { 
    color: #a09b95;
    padding: 6px 15px 7px 15px;
    padding: 6px 15px 5px 15px\9;           /* IE-only fix */
    text-decoration: none;
    display: block;
    border-bottom: 1px solid #c9c3ba;
    border-right: 1px solid #c9c3ba;
/*  background-color: #ffffff; */
    background: -webkit-gradient(linear, left top, left bottom, from(#ffffff), to(#f3efeb)); /* Saf4+, Chrome */
    background: -webkit-linear-gradient(top, #ffffff, #f3efeb); /* Chrome 10+, Saf5.1+, iOS 5+ */
    background:    -moz-linear-gradient(top, #ffffff, #f3efeb); /* FF3.6+ */
    background:     -ms-linear-gradient(#FFFFFF, #F3EFEB); /* IE 8 */
    background:      -o-linear-gradient(top, #ffffff, #f3efeb); /* Opera 11.10+ */
    background:         linear-gradient(to bottom, #ffffff, #f3efeb); /* IE9+ */
    -pie-background:    linear-gradient(#FFFFFF, #F3EFEB); /* IE 6-7 via CSS3Pie */
    behavior: url("http://ocw5.mit.edu/styles/pie/PIE.php");
}   


ul#tabs li a.selected {
    color: #b30838;
    border-bottom: 1px solid #fff;
    background-color: #fff;
    background: none;
    -pie-background: none;
    behavior: url("http://ocw5.mit.edu/styles/pie/PIE.php");
}


/* Chrome/Safari-only CHP tab border fix */
@media screen and (-webkit-min-device-pixel-ratio:0) {

    ul#tabs {
        margin: 19px 0 -1px 0;
        outline: 0;
    }

}

【问题讨论】:

  • 请输入代码?我们不是头脑/代码阅读器!
  • fiddle 中发布您的代码,并更具体地说明您的实际问题是什么。
  • 嗨@Benjamin 很高兴在这里见到你! :P
  • 哪一个是正确的?
  • @punithasubramaniv 应该是左边!

标签: css google-chrome


【解决方案1】:

试试这个:

ul#tabs li {margin-bottom: -1px;}

【讨论】:

  • 我应该在哪里添加这个。我在 (ul#tabs li a:) 部分中尝试过我上面给出的代码....但没有用。
  • @Ranjan 试试position: relative; bottom: -1px;
  • 最后加上就行了。
猜你喜欢
  • 2023-02-04
  • 2022-10-24
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2016-11-08
  • 2020-09-12
相关资源
最近更新 更多