我在浏览此幻灯片中的图片时遇到问题(使用bxslider) - http://badsekta.com/trix/collection.html
我已经尝试了几天谷歌的各种方法,但发现自己陷入困境,所以非常感谢任何帮助或建议!
谢谢,
威尔
HTML >
<header>
<div id="nav">
<ul>
<li><a href="index.html" title="Home">Home</a></li>
<li><a href="collection.html" title="Collection">Collection</a></li>
<li><a href="shop.html" title="Shop">Shop</a></li>
<li><a href="faq-policies.html" title="Frequently asked questions and policies">FAQ/Policies</a></li>
<li><a href="contact.php" title="Contact">Contact</a></li>
</ul>
</li>
</ul>
<br class="clearboth"/>
</div>
</header>
<br>
<div class="table">
<table width="600px" border="0" cellspacing="0" cellpadding="10">
<tr>
<td colspan="1" align="left" valign="middle"><img src="assets/img/logo.png" alt="" width="504" height="139"></td>
</tr>
<tr>
<td colspan="1" align="left" valign="middle">COLLECTION</td>
</tr>
<td colspan="1" align="center" valign="middle">
<ul class="bxslider">
<li><img src="assets/img/collection-slider-images/1.jpg" /></li>
<li><img src="assets/img/collection-slider-images/2.jpg" /></li>
<li><img src="assets/img/collection-slider-images/3.jpg" /></li>
<li><img src="assets/img/collection-slider-images/4.jpg" /></li>
<li><img src="assets/img/collection-slider-images/5.jpg" /></li>
<li><img src="assets/img/collection-slider-images/6.jpg" /></li>
<li><img src="assets/img/collection-slider-images/7.jpg" /></li>
<li><img src="assets/img/collection-slider-images/8.jpg" /></li>
<li><img src="assets/img/collection-slider-images/9.jpg" /></li>
<li><img src="assets/img/collection-slider-images/10.jpg" /></li>
</ul>
</tr>
</td>
</table>
</div>
CSS >
header {
margin-left: auto;
margin-right: auto;
text-align: center;
position: fixed;
z-index: 10;
}
.table {
margin-left: 75px;
text-decoration: none;
margin-top:300px;
}
/* Nav menu */
#nav {
font-weight: bold;
font-size: 1.3em;
padding: 20px;
margin-top:20px;
padding-left: 66px;
text-align:center;
}
#nav ul {
padding: 0;
list-style: none;
display: block;
text-align:center;
}
#nav a:link, #nav a:visited {
color: #ae55ed;
text-decoration: none;
}
#nav a {
padding: 12px 16px;
}
#nav a:hover {
padding: 12px 16px;
color: #F00;
}
#nav li {
float: left;
margin-right: 1px;
position: relative;
}
#nav li:before {
content: " | ";
color: #fff;
}
#nav li:first-child:before {
content: none;
}
#nav li li {
width: 160px;
margin-top: 1px;
}
#nav li:hover {
color: #F00;
}
#nav li li:hover {
color: #F00;
}
#nav ul ul {
position: absolute;
visibility: hidden;
}
#nav ul ul ul {
position: absolute;
left: 100%;
top: -2px;
border: solid 1px transparent;
}
#nav li:hover > ul {
visibility: visible;
}
/** RESET AND LAYOUT
===================================*/
.bx-wrapper {
position: relative;
margin: 0 auto 60px;
padding: 0;
*zoom: 1;
}
.bx-wrapper img {
max-width: 100%;
display: block;
margin: 0 auto;
}
/** THEME
===================================*/
.bx-wrapper .bx-viewport {
-moz-box-shadow: 0 0 3px #ccc;
-webkit-box-shadow: 0 0 3px #ccc;
box-shadow: 0 0 3px #ccc;
border: 3px solid #fff;
left: -3px;
background: #fff;
/*fix other elements on the page moving (on Chrome)*/
-webkit-transform: translatez(0);
-moz-transform: translatez(0);
-ms-transform: translatez(0);
-o-transform: translatez(0);
transform: translatez(0);
}
.bx-wrapper .bx-pager, .bx-wrapper .bx-controls-auto {
position: absolute;
bottom: -30px;
width: 100%;
}
/* LOADER */
.bx-wrapper .bx-loading {
min-height: 50px;
background: url(images/bx_loader.gif) center center no-repeat #fff;
height: 100%;
width: 100%;
position: absolute;
top: 0;
left: 0;
z-index: 2000;
}
/* PAGER */
.bx-wrapper .bx-pager {
text-align: center;
font-size: .85em;
font-family: Ubuntu;
font-weight: bold;
color: #666;
padding-top: 20px;
}
.bx-wrapper .bx-pager .bx-pager-item, .bx-wrapper .bx-controls-auto .bx-controls-auto-item {
display: inline-block;
*zoom: 1;
*display: inline;
}
.bx-wrapper .bx-pager.bx-default-pager a {
background: #666;
text-indent: -9999px;
display: block;
width: 10px;
height: 10px;
margin: 0 5px;
outline: 0;
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
border-radius: 5px;
}
.bx-wrapper .bx-pager.bx-default-pager a:hover, .bx-wrapper .bx-pager.bx-default-pager a.active {
background: #000;
}
/* DIRECTION CONTROLS (NEXT / PREV) */
.bx-wrapper .bx-prev {
left: 10px;
background: url(images/controls.png) no-repeat 0 -32px;
}
.bx-wrapper .bx-next {
right: 10px;
background: url(images/controls.png) no-repeat -43px -32px;
}
.bx-wrapper .bx-prev:hover {
background-position: 0 0;
}
.bx-wrapper .bx-next:hover {
background-position: -43px 0;
}
.bx-wrapper .bx-controls-direction a {
position: absolute;
top: 50%;
margin-top: -16px;
outline: 0;
width: 32px;
height: 32px;
text-indent: -9999px;
z-index: 9999;
}
.bx-wrapper .bx-controls-direction a.disabled {
display: none;
}
/* AUTO CONTROLS (START / STOP) */
.bx-wrapper .bx-controls-auto {
text-align: center;
}
.bx-wrapper .bx-controls-auto .bx-start {
display: block;
text-indent: -9999px;
width: 10px;
height: 11px;
outline: 0;
background: url(images/controls.png) -86px -11px no-repeat;
margin: 0 3px;
}
.bx-wrapper .bx-controls-auto .bx-start:hover, .bx-wrapper .bx-controls-auto .bx-start.active {
background-position: -86px 0;
}
.bx-wrapper .bx-controls-auto .bx-stop {
display: block;
text-indent: -9999px;
width: 9px;
height: 11px;
outline: 0;
background: url(images/controls.png) -86px -44px no-repeat;
margin: 0 3px;
}
.bx-wrapper .bx-controls-auto .bx-stop:hover, .bx-wrapper .bx-controls-auto .bx-stop.active {
background-position: -86px -33px;
}
/* PAGER WITH AUTO-CONTROLS HYBRID LAYOUT */
.bx-wrapper .bx-controls.bx-has-controls-auto.bx-has-pager .bx-pager {
text-align: left;
width: 80%;
}
.bx-wrapper .bx-controls.bx-has-controls-auto.bx-has-pager .bx-controls-auto {
right: 0;
width: 35px;
}
/* IMAGE CAPTIONS */
.bx-wrapper .bx-caption {
position: absolute;
bottom: 0;
left: 0;
background: #666\9;
background: rgba(80, 80, 80, 0.75);
width: 100%;
}
.bx-wrapper .bx-caption span {
color: #fff;
font-family: Ubuntu;
display: block;
font-size: .85em;
padding: 10px;
}
答案 0 :(得分:1)
你的.bxslider元素上有40px左边的填充(和16px的边距),这会使图像不对齐,所以只需将以下内容添加到你的css中:
.bxslider {
margin: 0;
padding: 0;
}