Javascript 如何在引导模式中使用数据幻灯片效果?
是否可以在引导模式内使用数据幻灯片效果,而不使用旋转木马 当我单击模式中的“下一步”按钮时,它需要滑动到下一个div,当单击“上一步”按钮时,它需要滑动到上一页 这可能吗Javascript 如何在引导模式中使用数据幻灯片效果?,javascript,jquery,html,css,twitter-bootstrap,Javascript,Jquery,Html,Css,Twitter Bootstrap,是否可以在引导模式内使用数据幻灯片效果,而不使用旋转木马 当我单击模式中的“下一步”按钮时,它需要滑动到下一个div,当单击“上一步”按钮时,它需要滑动到上一页 这可能吗 <!-- Modal --> <div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<!-- Modal -->
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
<h4 class="modal-title" id="myModalLabel">Modal title</h4>
</div>
<div class="modal-body">
This is Content 1
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
<button type="button" class="btn btn-primary">Move Next</button>
</div>
<div class="modal-body">
This is Content 2
</div>
<div class="modal-footer">
<button type="button" class="btn btn-primary" style="float:left;">Move Back</button>
<button type="button" class="btn btn-primary">Move Next</button>
</div>
</div>
</div>
</div>
<!-- jQuery first, then Bo
&时代;
情态标题
这是内容1
接近
下一步
这是内容2
退后
下一步
您没有指定不想使用carrousel的原因。我要做的是把情态动词看作简单的滑块。我会使用一个比窗口大的模态容器,将模态对话框推到左边
您可以在这里观看实时示例:
$(“.btn下一步”)。单击(函数(){
$(“#模态容器”)。设置动画({
“左边距”:“-=100%”
}, 500);
});
$(“.btn back”)。单击(函数(){
$(“#模态容器”)。设置动画({
“左边距”:“+=100%”
}, 500);
});代码>
#模态容器{
宽度:200%;
/*一种模式-->100%,两种模式-->200%*/
溢出:隐藏
}
.模态对话框{
浮动:左;
宽度:50%;
利润率:10px自动;
}
.模态内容{
宽度:600px;
保证金:0自动;
}
启动演示模式
&时代;
情态标题
这是内容1
接近
下一步
&时代;
模式标题2
这是内容2
退后
下一步