我想在asp.net中创建一个页面,在这里我需要将页面分为3列,每列的宽度不同(20%,60%,20%),每列的高度应扩展到最大页面高度。
我不想使用position:absolute
和使用left,top属性来定位div标签,因为有人说使用position:absolute
不好,并且会在其他浏览器上造成问题。在这方面,请提供我任何其他解决方案的帮助。:)
这是HTML
<div class="width20">
Div with width 20%
</div>
<div class="width60">
Div with width 60%
</div>
<div class="width20">
Div with width 20%
</div>
这是CSS
body {
margin:0;
padding:0;
}
.width20 {
float:left;
width:20%;
background:grey;
height:100vh;
}
.width60 {
float:left;
width:60%;
background:orange;
height:100vh;
}
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句