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有什么ui框架?

bootstrap有cdn吗

快速入门bootstrapvue

bootstrap插件是什么

css怎么修改滚动条的样式

bootstrap能做什么

bootstrap table如何删除行

使用bootstrap-table实现分页和排序

bootstrap整体架构包含哪些模块

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




打赏

取消

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

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

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

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

评论

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