我正在使用Twitter启动3.3.5和使用模态对话框。我有一个带有标签的输入复选框的模态对话框。
当我尝试通过单击标签来选中复选框时,复选框会被选中,但背景区域也会被选中。
试试这里。http://www.bootply.com/6ARha6pomY。打开对话框,试着快速单击“Select”标签(双击可能)。您将看到背景区域被选中为“蓝色”。
如果可能的话,我如何在不使用javascript的情况下阻止背景选择。
谢谢。
发布于 2015-09-18 09:24:37
您可以使用user-select:
.prevent-select {
user-select: none;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
}
将上面的CSS类添加到模式中:
<div class="modal fade prevent-select" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
分叉引导-> http://www.bootply.com/xpsyZddUiI
https://stackoverflow.com/questions/32648267
复制相似问题