【发布时间】:2017-09-10 19:02:56
【问题描述】:
我查看this code sample 以放大图像。
我尝试在bootstrap3 Slide Carousel中使用它。
我尝试添加“放大”类 bootstrap3 幻灯片轮播项目。:
<div class="item active">
<div class="item-item col-md-3 col-sm-4">
<a href="#">
<img src="http://placehold.it/500/bbbbbb/fff&text=1" class="img-responsive enlarge">
</a>
</div>
</div>
css:
.enlarge {
width: 100%;
float: left;
-webkit-transition: all 0.5s ease-in-out;
-moz-transition: all 0.5s ease-in-out;
transition: all 0.5s ease-in-out;
}
.enlarge:hover {
width: 120%;
-webkit-transition: all 0.5s ease-in-out;
-moz-transition: all 0.5s ease-in-out;
transition: all 0.5s ease-in-out;
cursor: pointer;
}
你可以看到变化here in jsfiddle。
但是放大不了,怎么办?
【问题讨论】:
-
它确实放大了小提琴中的图像!有什么问题?
-
@NarenMurali 我编辑我的帖子。对于较小的宽度,它可以工作。但对于 width:100% 不起作用。
-
它为
width:100%放大了你能检查一下这个小提琴here -
@感谢您的回答。 100% 是自然尺寸。我想放大它,例如 120%
-
这不能通过缩放滑动的项目来实现
标签: javascript html css twitter-bootstrap carousel