我们应该在html语义类文章的内部还是外部包含bootstrap容器类? [英] Should we include the bootstrap container class inside or outside of html semantic class article?
本文介绍了我们应该在html语义类文章的内部还是外部包含bootstrap容器类?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我们是否应该在html语义类< article>
之内或之外包含bootstrap 容器
类?
Should we include the bootstrap container
class inside or outside of html semantic class <article>
?
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>html</title>
<link rel="stylesheet" href="css/style.css">
<link rel="author" href="humans.txt">
</head>
<body>
<div class="container">
<article>
...
</article>
</div>
<script src="js/main.js"></script>
</body>
</html>
或者,这是推荐的吗?
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>html</title>
<link rel="stylesheet" href="css/style.css">
<link rel="author" href="humans.txt">
</head>
<body>
<article>
<div class="container">
...
</div>
</article>
<script src="js/main.js"></script>
</body>
</html>
推荐答案
Bootstrap需要包含元素包装网站内容并容纳我们的网格系统
Bootstrap requires a containing element to wrap site contents and house our grid system
考虑到这一点 - 您应该将容器放在外面。您可以使用网格来存放文章。
With that in mind - you should keep the container on the outside. You can use grids to house the articles from that point on.
这篇关于我们应该在html语义类文章的内部还是外部包含bootstrap容器类?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文