【发布时间】:2019-01-21 08:16:12
【问题描述】:
我是 HTML、CSS 的新手,我正在尝试为我的项目创建一个网站,但是其中一个要求是它应该是响应式网站。 出于某种原因,我的黄色盒子变得越来越小,不像我的红色和蓝色盒子,当我点击智能手机查看时,笔记本电脑视图和不同的另一个视图都很大,只是黄色盒子变得又小又薄。我想寻求帮助或建议,使其成为响应式网站,谢谢
<link href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css" rel="stylesheet"/>
<div class="row">
<div class="col-md-4" style="margin-left: 3%" >
<div class="color">Column 1</div>
<div class="color" >Column 2</div>
</div>
<div class="col-md-8">Column 3</div>
</div>
<style type="text/css">
.color:nth-child(1) {
background:red;
height:40%;
margin-top:5%;
margin-left: 2%;
border-radius: 4%;
width: 100%;
}
.color:nth-child(2) {
margin-top: 3%;
border-radius: 4%;
background:blue; height:260px;
}
.col-md-8 {
background:yellow; height:628px;
width: 38%;
margin-left: 15%;
margin-top: 1%;
border-radius: 9%;
}
</style>
【问题讨论】:
-
为什么这个标签是 Bootstrap 4?究竟是什么问题/问题?
-
对不起,我的问题只是如何让它在手机中响应
-
如果它在手机上没有响应,请确保您已包含元视口标签:stackoverflow.com/a/19158781/171456