码迷,mamicode.com
首页 > 其他好文 > 详细

解决 select2在bootstrap modal中不能正常使用问题

时间:2018-11-28 17:36:33      阅读:316      评论:0      收藏:0      [点我收藏+]

标签:index   rop   imp   choice   color   mask   sea   arc   tst   

select2在bootstrap modal中不能正常使用问题

设置CSS

        .select2-drop {
            z-index: 10050 !important;
        }

        .select2-search-choice-close {
            margin-top: 0 !important;
            right: 2px !important;
            min-height: 10px;
        }

        .select2-search-choice-close:before {
            color: black !important;
        }

        /*防止select2不会自动失去焦点*/
        .select2-container {
            z-index: 16000 !important;
        }

        .select2-drop-mask {
            z-index: 15990 !important;
        }

        .select2-drop-active {
            z-index: 15995 !important;
        }

设置下拉

$("#User").select2(
  {dropdownParent: $("#Modal")}
)

解决 select2在bootstrap modal中不能正常使用问题

标签:index   rop   imp   choice   color   mask   sea   arc   tst   

原文地址:http://blog.51cto.com/hequan/2323225

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!