-1
A
回答
2
这是一种方式(灵感来自于这个Fiddle),通过添加一个CSS类right
模式显示它从右侧。
.modal.fade:not(.in).right .modal-dialog {
-webkit-transform: translate3d(25%, 0, 0);
transform: translate3d(25%, 0, 0);
}
<link href="http://netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.min.css" rel="stylesheet"/>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="http://netdna.bootstrapcdn.com/bootstrap/3.0.0/js/bootstrap.min.js"></script>
<div id="myModal" class="modal fade right">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">×<span class="sr-only">Close</span></button>
<h4 class="modal-title">Modal title</h4>
</div>
<div class="modal-body">
<p>Modal body</p>
</div>
</div>
</div>
</div>
<a class="btn btn-primary" data-toggle="modal" data-target="#myModal">Open modal from the right</a>
+0
我想将其设置为右对齐,就像我们边栏? 我问过了! –
相关问题
- 1. Bootstrap模式打开从PHP而结果
- 2. 从swf打开bootstrap模态
- 3. 如何在右侧而不是左侧打开Materialise SideNav?
- 4. Android:如何在android studio 1.5.1中设置android.support.design.widget.NavigationView从右侧打开?
- 5. ngx-bootstrap如何从另一个组件打开模式?
- 6. 如何使用react-bootstrap从导航栏打开模式?
- 7. 从模态打开bootstrap模态
- 8. Bootstrap将导航栏右侧
- 9. 如何实现从右侧
- 10. 在右侧打开萤火虫
- 11. 打开右侧内容点击产品
- 12. 脚本不打开右侧链接
- 13. 无法在codeigniter中打开Bootstrap模式
- 14. 如何在窗口的右侧打开Vim的Taglist插件?
- 15. 如何打开右侧的弹出窗口?
- 16. 如何在右侧窗口中打开emacs-nav缓冲区?
- 17. 如何在右侧打开日食视图
- 18. 如何让NERDTree始终在右侧打开?
- 19. 如何链接打开Bootstrap模式中的特定选项卡?
- 20. 如何更改bootstrap模式打开的方向?
- 21. 右侧菜单在Swift中单击时打开左侧菜单
- 22. 如何从ContextMenu打开模态(单击鼠标右键)?
- 23. 防止背景从模式打开时滚动(不是BOOTSTRAP)
- 24. Modal Bootstrap /多页模式的单页/模式打开类
- 25. 选择人名从右侧开始
- 26. 右侧的Bootstrap侧栏而不是左侧
- 27. 如何让图像从左侧0,0位置向右侧移动到右侧?
- 28. 如何在右侧
- 29. 从IFrame中打开模式
- 30. Bootstrap 4从左至右依次展开
可能会有所帮助:) https://codepen.io/bootpen/pen/jbbaRa –