響應的div我與引導試驗,這是我寫的代碼:創建在引導
<!doctype html>
<html lang="en">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="./css/bootstrap.min.css">
<link rel="stylesheet" href="./css/bootstrap-theme.min.css">
<style type="text/css">
.row-centered {
text-align:center;
}
.col-centered {
display:inline-block;
float:none;
text-align:left;
margin-right:-4px;
}
.pos{
position: relative;
top: 240px;
}
</style>
</head>
<body>
<div class="container">
<div class="row row-centered pos">
<div class="col-lg-8 col-centered">
<div class="well"></div>
</div>
<div class="col-lg-8 col-centered">
<div class="well"></div>
</div>
<div class="col-lg-8 col-centered">
<div class="well"></div>
</div>
</div>
</div>
</body>
</html>
爲如下的截屏輸出:
但是,當我轉換成手機屏幕,我得到這樣的:
我希望divs出現在中心,在移動屏幕上也有一個在上面。我該怎麼做? 但它沒有響應。
使用col-md-8,col-sm-8和col-lg – Patrick 2015-03-13 14:13:35
是否嘗試將顯示更改爲塊,而不是內嵌塊?我現在還沒有準備好jsfiddle – 2015-03-13 14:16:40