如何使用Bootstrap 3響應HTML彈出窗口?Bootstrap 3:響應式HTML彈出窗口
HTML,
<div class="center-pane">
<div class="pane-left">
Use this document as a way to quickly start any new project.<br> All you get is this text and a mostly barebones HTML document.
</div>
<div class="pane-right">
<form method="post" action="/login/">
<div class="form-group">
<label class=" required-field">E-Mail:</label>
<input type="text" name="username" required id="id_username" class="form-control" maxlength="150">
</div>
<div class="form-group">
<label class=" required-field">Password:</label>
<input type="password" name="password" required class="form-control" id="id_password">
</div>
<button type="submit" class="btn btn-default btn-primary btn-block" value="Login">Login</button><br>
<a href="/omg">I'm desperated!</a>
</form>
<div class="misc text-center">
Some text
<br>
<a href="http://jigsaw.w3.org/css-validator/check/referer">CSS</a> |
<a href="http://validator.w3.org/check/referer">HTML5</a>
</div>
</div>
</div>
CSS,
/* HTML POPUP
-------------------------------------------------- */
.center-pane {
margin: auto;
position: absolute;
top: 0; left: 0; bottom: 0; right: 0;
max-width: 1000px;
height: 320px;
border:1px solid red;
}
.pane-left,
.pane-right{
width:480px;
float:left;
border:1px solid blue;
}
.center-pane
響應,當我調整我的瀏覽器窗口。但不是.pane-left
和 .pane-right
- 我怎樣才能使這兩個響應以及?
編輯:
如果我用model's solution,似乎更多的問題,我需要解決:
<!-- Button trigger modal -->
<button class="btn btn-primary btn-lg" data-toggle="modal" data-target="#myModal">
Launch demo modal
</button>
<!-- Modal -->
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h4 class="modal-title" id="myModalLabel">Modal title</h4>
</div>
<div class="modal-body">
...
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
<button type="button" class="btn btn-primary">Save changes</button>
</div>
</div>
</div>
</div>
的model
對話框默認情況下不絕對垂直中心 - 我怎麼能改變?另外,我怎樣才能改變對話框的大小呢?我需要兩列 - 一個左邊,一個右邊是響應。模型如何幫助我做到這一點。我無法在bootstrap網站的文檔中看到它。我會盡量避免通過js進行任何定製。
另外,您需要點擊按鈕來觸發對話框。我不想使用按鈕來獲得對話框,我想要加載html文檔時獲得彈出窗口。可能嗎?
爲什麼不使用引導模型? http://getbootstrap.com/javascript/#modals – vlio20
謝謝。請參閱我上面的編輯。 – laukok