【发布时间】:2018-08-11 23:25:10
【问题描述】:
我以前的网站是 Boostrap 3.3.4,但自从我搬到 Bootstrap 4 后,一切都坏了。
基本上我的网站结构非常简单,一个包含一些jumbotrons和一些panels的容器
<body>
<section class="container">
<div class="jumbotron vertical-center">
<div><img src="img/hello.jpg" style="width: 35%" class="img-responsive" title="Hello" alt="World"></div>
<h2>my website!!</h2>
<div class="panel panel-default">
<div class="panel-body">
<h4> stackoverflow </h4>
</div>
</div>
<div class="panel panel-default">
<div class="panel-body">
<h4><span class="glyphicon glyphicon-education" aria-hidden="true"></span><strong> This is reall cool! </h4>
</div>
</div>
等等。
CSS 很简单
.container {
max-width: 600px;
background:white;
padding: 30px 30px;
text-align: center;
background: transparent;
}
.jumbotron {
background: white;
}
在这里,我会有一套居中、响应式漂亮的块(带有圆形边缘),不会占据屏幕的整个宽度。
我不知道如何适应 Bootstrap 4。
【问题讨论】:
-
为什么投反对票?这是一个有趣的问题,答案很好
-
我也很想知道人们为什么投反对票。从我的角度来看,从 v3 升级到 v4 的意图是正常的,尤其是当人们对 Bootstrap 不太了解时。因此,这个问题有可能对未来的用户有用。
-
我同意 :)
标签: html css twitter-bootstrap-3 bootstrap-4