Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/79.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Html 为什么我不能用bootstrap更改回传? 你好_Html - Fatal编程技术网

Html 为什么我不能用bootstrap更改回传? 你好

Html 为什么我不能用bootstrap更改回传? 你好,html,Html,嘿,那里!,第一个帖子在这里,有人能告诉我为什么这行不通吗?我已经最大限度地简化了我的代码。问题是,如果我把我的浏览器窗口小于1200px,它就会工作 页面的问题在于,您没有将引导的网格支持所需的所有结构放置到位:列应该在行中,行应该在容器中,有关详细信息,请参阅 对代码的以下修改按预期工作: <!DOCTYPE html> <head> <link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/

嘿,那里!,第一个帖子在这里,有人能告诉我为什么这行不通吗?我已经最大限度地简化了我的代码。问题是,如果我把我的浏览器窗口小于1200px,它就会工作

页面的问题在于,您没有将引导的网格支持所需的所有结构放置到位:列应该在行中,行应该在容器中,有关详细信息,请参阅

对代码的以下修改按预期工作:

<!DOCTYPE html>
<head>
    <link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">
 </head>
 <body>
    <div style="background-color:grey">
        <div class="col-lg-12">
           <h1>hello</h1>
        </div>
   </div>
</body>
</html>

你好

(从技术上讲,出现问题的原因是“col-lg-12”类将包含“hello”的div设置为浮点数,因此它不再包含在具有灰色背景的div中,然后灰色div的高度为0,因此不可见。)

将位置或高度属性添加到div中

<!DOCTYPE html>
<head>
  <link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/c\
ss/bootstrap.min.css">
</head>
<body>
  <div style="background-color:grey" class="container">
    <div class="row">
      <div class="col-lg-12">
        <h1>hello</h1>
      </div>
    </div>
  </div>
</body>
</html>

你好

这是一篇很好的第一篇文章,最简单的例子真的很有帮助!
<!DOCTYPE html>
<head>
<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">
</head>
<body>
<div style="background-color:grey;position:absolute">
    <div class="col-lg-12">
       <h1>hello</h1>
    </div>
 </div>
</body>
</html>