bootstrap模态框如何加滚动条


本文摘自PHP中文网,作者爱喝马黛茶的安东尼,侵删。

在html文件的<style></style>标签中加上如下代码:

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

.modal-dialog {

           position: absolute;

           top: 0;

           bottom: 0;

           left: 0;

           right: 0;

       }

 

       .modal-content {

           /*overflow-y: scroll; */

           position: absolute;

           top: 0;

           bottom: 0;

           width: 100%;

       }

 

       .modal-body {

           overflow-y: scroll;

           position: absolute;

           top: 55px;

           bottom: 65px;

           width: 100%;

       }

 

       .modal-header .close {margin-right: 15px;}

 

       .modal-footer {

           position: absolute;

           width: 100%;

           bottom: 0;

       }

然后再打开模态框,可以看到,滚动条已经出现了。

阅读剩余部分

相关阅读 >>

bootstrap模态框有什么用

bootstrap table插件怎么换行

bootstrap有什么用处

bootstrap如何兼容ie6

bootstrap table分页问题汇总【附答案&代码】

dialog是bootstrap的么

css怎么设置滚动条透明

关于bootstrap model隐藏问题

bootstrap如何隐藏div

html如何引用bootstrap

更多相关阅读请进入《bootstrap》频道 >>




打赏

取消

感谢您的支持,我会继续努力的!

扫码支持
扫码打赏,您说多少就多少

打开支付宝扫一扫,即可进行扫码打赏哦

分享从这里开始,精彩与您同在

评论

管理员已关闭评论功能...