大家可能已经了解w3schools推出的新的w3-css了。 W3-css链接 我正在使用w3-css进行一些手动修改,似乎他们的网格列有点问题。
显然,这会与Bootstrap进行比较。 在Bootstrap中,当您保留任何列为空时,它只占用空间,但是在w3-css中不会这样。
因此,w3-css强迫人们不要让列留空,否则会破坏页面布局。
这个问题可能有哪些解决方案呢?
plunker友好类型的网页链接在这里 PLUNKER
<!DOCTYPE html>
<html>
<title>W3.CSS</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://www.w3schools.com/w3css/4/w3.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<body>
<h4>Filled column with w3-css</h4>
<div class="w3-row">
<div class="w3-col m4 w3-grey">1</div>
<div class="w3-col m8 w3-red">4</div>
</div>
<h4>empty column with w3-css</h4>
<h5>You cant keep your column empty??? You have to keep something in it. otherwise it want occupy any space. </h5>
<div class="w3-row">
<!-- Making first column emty -->
<div class="w3-col m4 w3-grey"></div>
<div class="w3-col m8 w3-red">4</div>
</div>
<h4>Filled column with Bootstrap css</h4>
<div class="row">
<div class="col-sm-4" style="background-color:red;">12123</div>
<div class="col-sm-8" style="background-color:lavenderblush;">.col-sm-8</div>
</div>
<h4>empty column with Bootstrap css</h4>
<div class="row">
<div class="col-sm-4"></div>
<div class="col-sm-8" style="background-color:lavenderblush;">.col-sm-8</div>
</div>
</body>
</html>