问题描述
|
我正在使用jQuery-cycle来驱动我的一张幻灯片,并且应用于容器div的border-radius属性无法按预期工作:\“ View Content \”幻灯片具有圆角,其他幻灯片则没有。
#carousel {-webkit-border-radius: 15px; -moz-border-radius: 15px; border-radius: 15px;}
我的周期初始化代码:
$(\'#carousel\').cycle( {
speed: 400,startingSlide: 1,speedIn:null,speedOut:null,cleartype: false,fit:1,width:980,delay: 0,timeout:0,fx: \'scrollHorz\',easing: \'swing\',easeIn:null,eaSEOut:null,prev: \'#left\',next: \'#right\',pager: \'#pager\',pagerAnchorBuilder: function ( idx,slide ) {
return(\'<span><b>0\'+slide.id+\'</b> / 07</span>\');
},updateActivePagerLink: function(pager,activeIndex) {
if(activeIndex==0){
$(\'#navigation\').hide();
$(\'#bottombar\').css({\'margin-top\':\'22px\'});
}
else if(activeIndex==1){
$(\'#left\').hide(); $(\'#right\').show();
$(\'#bottombar\').css({\'margin-top\':\'540px\'});
}
else if(activeIndex==7){
$(\'#left\').show(); $(\'#right\').hide();
$(\'#bottombar\').css({\'margin-top\':\'540px\'});
}
else
{
$(\'#right\').show();$(\'#left\').show();
$(\'#bottombar\').css({\'margin-top\':\'540px\'});
} $(\'#pager\').find(\'span:eq(\'+activeIndex+\')\').addClass(\'activeSpan\').siblings().removeClass(\'activeSpan\');
}
});
演示:http://rjwcollective.com/equinox/brochure/
解决方法
实际上,您在#carousel div上遇到了麻烦(您可以通过在#carousel上添加红色边框来进行测试)。之所以看不到它,是因为这些图像完全定位并且没有圆角。
如果要显示圆角,请将此规则添加到样式表中:
.carousel_cont {
padding: 15px 0px;
}