我正处于设计阶段,我只想确保自己走在正确的道路上。 我正在使用bootstrap,我确实需要我的设计才能做出响应。我设计了一个简单的布局如下,当我在chrome切换设备工具栏中检查时,一切都是我想要的。我的代码如下:
<!DOCTYPE html>
<html lang="en">
<head>
<title>ReactJS Basics</title>
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet"
href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"
integrity="sha384- BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u"
crossorigin="anonymous">
<!-- Optional theme -->
<link rel="stylesheet"
href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap-theme.min.css"
integrity="sha384- rHyoN1iRsVXV4nD0JutlnGaslCJuC7uwjduW9SVrLvRYooPp2bWYgmgJQIXwl/Sp"
crossorigin="anonymous">
<script
src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"> </script>
<!-- Latest compiled and minified JavaScript -->
<script
src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"
integrity="sha384- Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa"
crossorigin="anonymous"></script>
<style>
/*----------------------HEADER -------------------------------------------- ------------- */
.header {
font-weight: bold;
background-color: #4070CB;
color: #EFF0F2;
height: 100px;
padding-top: 15px;
}
.col {
padding: 0 0 0 0;
}
.header a {
color: white;
font-size: 5vw;
}
.txt-align-right {
text-align: right;
}
.txt-align-left {
text-align: left;
}
.txt {
align-items: center;
display: flex;
text-align: center;
justify-content: center;
}
.font-size-xs {
font-size: 4vw;
}
</style>
</head>
<body>
<div id="mainContainer" class="container-fluid">
<div class="row">
<div class="col-xs-12 header">
<div class="col-xs-1"></div>
<div class="col-xs-2 txt-align-left">
<a href="#"> <!-- react-text: 7 --> <!-- /react-text --> <span
class="glyphicon glyphicon-align-justify"></span>
</a>
</div>
<div class="col-xs-6 txt font-size-xs">TEST For PRACTICE</div>
<div class="col-xs-2 txt-align-right">
<a href="#"> <!-- react-text: 12 --> <!-- /react-text --> <span
class="glyphicon glyphicon-phone"></span>
</a>
</div>
<div class="col-xs-1"></div>
</div>
</div>
<div class="row">
<div class="col-xs-12 col-sm-10 col-md-3 col-lg-3 color1">
<div class="row"></div>
</div>
<div class="col-xs-12 col-sm-10 col-md-4 col-lg-4 color2">test</div>
<div class="col-xs-12 col-sm-10 col-md-3 col-lg-3 color1">.col-sm-4</div>
</div>
</div>
但是我发现在不同帖子中人们建议使用元标记我在页面中添加了以下元:
<meta name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
但是只要我添加上面的元素,我的标题的外观就会有一些变化,这不是我想要的。现在我的问题是,当我的页面在使用chrome的切换设备工具栏的不同视图上看起来很好时我是否必须使用meta?或者我可以忽略它?我在想可能是因为我正在使用bootsrap它已经把meta做了什么,我不需要使用meta,我是对的吗?