我正在寻找一个解决方案,如何绘制一个响应方,其中的高度将给予%。
<div class="square"></div>
//CSS
.square{
background: red;
height: 49%;
//and what else make this div square I found many solutions how to make it but it is dependent on width :(
}
viewport: <meta name="viewport" content="in
我想做布局,我将有不同的全宽背景。例如,top是全宽橙色,在全宽div里面,我有一个容器,可以让所有东西都保持特定的尺寸(宽度: 1000px)。我遇到了一个问题,容器div的内容不能拉伸整个宽度的div。所以现在为了让它正常工作,我必须设置.orange和.red的特定高度。但这不是解决方案,因为现在我的区块有xxx的高度,如果我添加一些像更多的图片-我必须设置更大的高度等。
我的意思是:
HTML
<div class="full-width orange">
<div class="container">
c