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>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
把carousel-control background-image 设置为none. 懒人方法
或者将background-repeat设置为 no-repeat;这个是导致黑线出现的原因。