gpt4 book ai didi

javascript - Bootstrap Modal 不随默认浏览器页面滚动条滚动

转载 作者:行者123 更新时间:2023-11-28 16:26:49 30 4
gpt4 key购买 nike

我在 php/codeIgniter 工作。但是我的问题与 Bootstrap Modal 有关。
我编写的模式的 HTML 如下:

<li><a href="#contactmodel" data-toggle="modal">Contact us</a>
<div id="contactmodel" class="modal fade cmodal" role="dialog">
<div class="modal-dialog modal-sm" role="document">
<!-- Modal content-->
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">&times;</button>
<h4 class="modal-title cus-modal-title">Contact Us | <span class="cus-modal-stitle">have your say...</span></h4>
</div>
<div class="modal-body">
<div class="col-md-10 col-md-offset-1 cus-model-margin">
<?php
$attributes = array('name' => 'contactform',
'target' => '_self',
'id' => 'contact', 'class' => 'htmlform'
);
echo form_open('contactus', $attributes);
?>
<div class="form-group">
<input type="text" class="form-control inputstyle-text" name="nick" id="nick" placeholder="Write your nick name ..." ng-model="nick" type="text" required pattern="^[A-Za-z]{5,15}$" title="Only alphabets allowed. Min. 2 & Max. 15" style="text-transform: lowercase"> <span class="glyphicon glyphicon-user" style="color: red"></span></input>
</div>
<div class="form-group">
<input type="email" class="form-control inputstyle-text" name="email" id="email" placeholder="Write your email ..." ng-model="email" required type="email" style="text-transform: lowercase"> <span class="glyphicon glyphicon-envelope" style="color: red"></span></input>
</div>
<div class="form-group">
<textarea class="form-control text-style" rows="5" name="msg" id="msg" placeholder="Anything to say ..." ng-model="text" type="msg" required pattern="^[A-Za-z]{100,300}$" title="Only alphabets allowed. Max. 300" style="text-transform: lowercase"> </textarea> <span class="glyphicon glyphicon-font" style="color: red"></span>
</div>
<div class="form-group">
<button type="submit" name="submit" class="btn btn-primary">Send <span class="glyphicon glyphicon-envelope" style="color: black"></span></button>
</div>
<?php echo form_close(); ?>
</div>
</div>
</div>
</div>
</div>
</li>

我有工作的 Bootstrap,但是我已经为模态添加了一些自定义 css,仅此而已,如下所示:

.cus-modal-title{

color: black;
text-align: left !important;

}
.cus-modal-stitle{

font-size: 10px;

}
.cus-model-margin{

margin-left: 0.333333% !important;
}
.modal.fade.in {

top: 40% !important;
}
.cmodal{

z-index: 1051 !important;

}
a:focus {

outline: thin dotted #333;
outline: 0px auto -webkit-focus-ring-color !important;
outline-offset: -2px;
}
.cus-model-body{

background: url('../images/content.png');

}

我已将模态框放在页脚中,并带有联系我们链接。
现在的问题是模态框不会随着网络浏览器页面的默认滚动条滚动。我使用的是 google-chrome。
任何形式的帮助都将不胜感激。

最佳答案

当我下载官方的 bootstrap css 并替换为已修改的旧版本时,问题得到了解决。

关于javascript - Bootstrap Modal 不随默认浏览器页面滚动条滚动,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35942651/

30 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com