我在这里有以下代码:
<div class="container-fluid">
<div class="row-fluid">
<div class="centering col-lg-8 topSection" style="text-align: center;">
<div class="col-lg-12" style="padding-top: 160px;">
<h2 style="color: #fff; font-size: 30px;">Get discovered - Discover - Connect</h2>
<h3 style="color: #fff; font-size: 23px;">We love everyting about music. The scene. The people. The livestyle. We live for it.</h3>
<button type="submit" class="btn_style_1 btn" data-toggle="modal" data-target="#myModalLogin">Sign in</button>
<button type="submit" class="btn_style_1 btn" data-toggle="modal" data-target="#myModal">Join now</button>
</div>
</div>
</div>
</div>
当我运行应用程序时,按钮不起作用。单击按钮时没有任何反应。当我将鼠标悬停在按钮上时,光标不会转换为指针。
但是,当我删除centering col-lg-8 topSection
时,登录按钮会起作用,但不会起作用。
有没有人有同样的问题?
编辑:
我在我的Layout.cshtml中有这个:
<div class="col-lg-12">
@RenderBody()
</div>
当我删除div时,它有效。
答案 0 :(得分:0)
删除type="submit"
或将其替换为type="button"
。你的解决方案是:
<button type="button" class="btn_style_1 btn" data-toggle="modal" data-target="#myModalLogin">Sign in</button>
<button type="button" class="btn_style_1 btn" data-toggle="modal" data-target="#myModal">Join now</button>