我正在玩http://www.slidesjs.com/滑块。试图使其全宽,但使当前幻灯片(slidescontent)全宽,但在容器(slidescenter)中有一个div,使其内容保持居中并设置宽度,这是我使用的代码:
<!doctype html>
<head>
<title>Title</title>
<style type="text/css" media="screen">
.slides_container {
width:100%;
height:270px;
}
.slides_container div {
width:100%;
height:270px;
display:block;
}
.slidescontent {width:100%;}
.slidescenter {width:990px;}
</style>
<script src="http://code.jquery.com/jquery-latest.min.js"></script>
<script src="slides.js"></script>
<script>
$(function(){
$("#slides").slides();
});
</script>
</head>
<body>
<div id="slides">
<div class="slides_container">
<div class="slidescontent">
<div class="slidescenter">
Text 1
</div>
</div>
<div>
Text 2
</div>
<div>
<img src="http://placehold.it/570x270">
</div>
<div>
<img src="http://placehold.it/570x270">
</div>
</div>
</div>
</body>