【发布时间】:2015-10-11 17:27:41
【问题描述】:
如何在我的引导轮播中显示 html 页面的输出而不是显示图像?我尝试创建一个 div 并使用 css 使用 content:url(carousel_content.html) 向该 ac1_div 提供内容。它不起作用。
<!-- our global achievers carousel -->
<div class="row">
<div class="col-sm-12 col-md-12 col-lg-12">
<div id="carousel-example-generic2" class="carousel slide" data-ride="carousel">
<!-- Indicators -->
<ol class="carousel-indicators">
<li data-target="#carousel-example-generic2" data-slide-to="0" class="active"></li>
<li data-target="#carousel-example-generic2" data-slide-to="1"></li>
<li data-target="#carousel-example-generic2" data-slide-to="2"></li>
</ol>
<!-- Wrapper for slides -->
<div class="carousel-inner" role="listbox">
<div class="item active" id="ac1_div">
</div>
<div class="item">
<img src="../images/banner_carousel_b.jpg" alt="...">
</div>
<div class="item">
<img src="../images/banner_carousel_c.jpg" alt="...">
</div>
</div>
<!-- Controls -->
<a class="left carousel-control" href="#carousel-example-generic2" role="button" data-slide="prev">
<span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span>
<span class="sr-only">Previous</span>
</a>
<a class="right carousel-control" href="#carousel-example-generic2" role="button" data-slide="next">
<span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span>
<span class="sr-only">Next</span>
</a>
</div>
</div>
</div>
/*my css code*/
#ac1_div
{
content: url("../pages/achievers/ac1.html");
}
<!--ac1.html-->
<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body>
<h1>achiever</h1>
</body>
</html>
【问题讨论】:
标签: html css twitter-bootstrap carousel