Css 设计灵活的页面布局

Css 设计灵活的页面布局,css,css-float,Css,Css Float,首先看用油漆准备好的图像 <div id="bottomleft"> </div> <div id="topleft"> </div> <div id="topright"> </div> <div id="bottomright"> </div> </div> </body> <div id="bottomleft"> </div> &l

首先看用油漆准备好的图像

<div id="bottomleft">
</div>

<div id="topleft">
</div>

<div id="topright">
</div>

<div id="bottomright">
</div>

</div>
</body>

<div id="bottomleft">
</div>

<div id="topleft">
</div>

<div id="topright">
</div>

<div id="bottomright">
</div>

</div>
</body>
我想设计一个灵活的网页,将有这种类型的四个部门。因此,显示器屏幕或浏览器大小的改变会自动重新调整窗口大小。这4个框应该适合100%的浏览器屏幕和任何显示器尺寸,避免滚动条出现。那么,有谁能告诉我如何在css样式表中进行编码呢

<div id="bottomleft">
</div>

<div id="topleft">
</div>

<div id="topright">
</div>

<div id="bottomright">
</div>

</div>
</body>
这是我的密码。 html:

<div id="bottomleft">
</div>

<div id="topleft">
</div>

<div id="topright">
</div>

<div id="bottomright">
</div>

</div>
</body>

<div id="bottomleft">
</div>

<div id="topleft">
</div>

<div id="topright">
</div>

<div id="bottomright">
</div>

</div>
</body>
嗨,现在定义你的
body,html高度100%如下所示

<div id="bottomleft">
</div>

<div id="topleft">
</div>

<div id="topright">
</div>

<div id="bottomright">
</div>

</div>
</body>
并在
id

<div id="bottomleft">
</div>

<div id="topleft">
</div>

<div id="topright">
</div>

<div id="bottomright">
</div>

</div>
</body>
body, html{
height:100%;
}
#bottomleft, #bottomright, #topright, #topleft{
box-sizing:border-box;
-moz-box-sizing:border-box;
-webkit-box-sizing:border-box;
}

您可以对所有设备使用此meta-in-head标记,并对任何窗口宽度使用其他css

<div id="bottomleft">
</div>

<div id="topleft">
</div>

<div id="topright">
</div>

<div id="bottomright">
</div>

</div>
</body>
此元数据用于加载css的任何设备和链接标记,最小宽度为شrbitrary

<div id="bottomleft">
</div>

<div id="topleft">
</div>

<div id="topright">
</div>

<div id="bottomright">
</div>

</div>
</body>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<link rel="stylesheet" media="print and (min-width: 25cm)" href="http://…" />


致以最诚挚的问候

您能告诉我是否真的需要我的css代码(指定高度,宽度为50%)吗?实际上您必须定义父级的高度,这就是@Rohit定义身体高度的原因,html……是的,现在知道了。它是如何工作的。?谢谢你让我开始。:)
<div id="bottomleft">
</div>

<div id="topleft">
</div>

<div id="topright">
</div>

<div id="bottomright">
</div>

</div>
</body>