bootstrap carousel 在Safari中有条黑线改如何解决呢?

chrome浏览器中就没有。

<!DOCTYPE html>
<html>
<head lang="zh-CN">
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-COMPATIBLE" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <title>测试carousel</title>
  <link href="dist/css/bootstrap.min.css" rel="stylesheet">
  <script src="dist/js/jquery-2.1.3.min.js"></script>
  <script src="dist/js/bootstrap.min.js"></script>
</head>
<body>


<div class="container">
    <div class="navbar navbar-inverse navbar-static-top">
      <div class="container">
        <div class="navbar-header">
          <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar">
            <span class="sr-only">Toggle navigation</span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
          </button>
          <a class="navbar-brand" href="#">
            云WiFi
          </a>
        </div>
        <div style="margin-right: 30px" class="navbar-collapse collapse navbar-right">
          <ul class="nav navbar-nav">
            <li class="active"><a href="#">首页</a> </li>
            <li><a href="#">产品功能</a> </li>
            <li><a href="#">成功案例</a> </li>
            <li><a href="#">联系我们</a> </li>
          </ul>
        </div>
      </div>
    </div>
  </div>


<!--滚动滑块-->


<div style="margin-top: -20px" class="container">
    <div id="mycarousel" class="carousel slide" data-ride="carousel">
      <ol class="carousel-indicators">
        <li data-target="#mycarousel" data-slide-to="0" class="active"></li>
        <li data-target="#mycarousel" data-slide-to="1"></li>
        <li data-target="#mycarousel" data-slide-to="2"></li>
      </ol>
      <div class="carousel-inner" role="listbox">
        <div class="item active">
          <img src="img/backgroud.png">
        </div>
        <div class="item">
          <img src="img/backgroup4.jpg">
        </div>
        <div class="item">
          <img src="img/slider2.jpg">
        </div>
      </div>
      <a class="left carousel-control" href="#mycarousel" data-slide="prev">
        <span class="glyphicon glyphicon-chevron-left"></span>
      </a>
      <a class="right carousel-control" href="#mycarousel" data-slide="next">
        <span class="glyphicon glyphicon-chevron-right"></span>
      </a>
    </div>
  </div>



</body>
</html>
已邀请:

stamina887

赞同来自:

把carousel-control background-image 设置为none. 懒人方法

或者将background-repeat设置为 no-repeat;这个是导致黑线出现的原因。

要回复问题请先登录注册