Html 定心模式(推特引导)
因此,我正在使用ASP.NETMVC制作一个网站,我在制作模式时遇到了问题。在我已经使用了一个模态,它工作正常,它在中间弹出。但现在,当我试图在新网站中放置一个模式时,我正在使该模式出现在右侧,你只能看到它的1/8。但是,如果你要恢复浏览器,你可以看到它完美。我真的不知道为什么会这样。我希望有人能帮助我。先谢谢你。以下是.cshtml代码: 这就是我称之为模态的地方:Html 定心模式(推特引导),html,css,asp.net-mvc,modal-dialog,bootstrap-modal,Html,Css,Asp.net Mvc,Modal Dialog,Bootstrap Modal,因此,我正在使用ASP.NETMVC制作一个网站,我在制作模式时遇到了问题。在我已经使用了一个模态,它工作正常,它在中间弹出。但现在,当我试图在新网站中放置一个模式时,我正在使该模式出现在右侧,你只能看到它的1/8。但是,如果你要恢复浏览器,你可以看到它完美。我真的不知道为什么会这样。我希望有人能帮助我。先谢谢你。以下是.cshtml代码: 这就是我称之为模态的地方: <div class="col-md-4 col-sm-6 p-1 animated umScaleIn">
<div class="col-md-4 col-sm-6 p-1 animated umScaleIn">
<div class="project-item">
<img src="~/Content/mytemplate/img/mucisian/5SOS.jpg" />
<div class="overlay">
<h4><a href="#5SOSModal" data-toggle="modal" data-backdrop="static" data-keyboard="false">5 Seconds of Summer</a></h4>
</div>
</div>
</div>
<div id="5SOSModal" class="modal" role="dialog">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button data-dismiss="modal" class="close"><span>×</span></button>
<h3 class="modal-title"> 5 Seconds of Summer </h3>
</div>
<div class="modal-body">
<figure>
<img src="~/Content/mytemplate/img/mucisian/5SOS.jpg" />
</figure>
<div class="offer-content text-center">
<h4>5SOS 5SOS</h4>
<p>Sed sagittis nunc vel tellus ultricies auctor. Class aptent taciti sociosqu ad litora torquent per conubia , per inceptos himenaeos. Integer eleifend tellu.</p>
<span class="offer-left"><i></i></span>
<span class="offer-right"><i></i></span>
</div>
</div>
<div class="modal-footer">
<a href="#" data-toggle="modal" data-backdrop="static" data-keyboard="false" class="shortcode_button">Exit</a>
</div>
</div>
</div>
</div>
尝试添加网站链接我已经尝试了你的代码,它工作正常,请看,一定有其他css影响模型弹出窗口
.modal {
position: fixed;
top: 0;
right: 0;
bottom: 0;
left: 0;
z-index: 1040;
display: none;
overflow: auto;
overflow-y: scroll;
}
.modal-dialog {
z-index: 1050;
width: auto;
padding: 10px;
margin-right: auto;
margin-left: auto;
}