我想让aspx页面的高度自动。所以我固定了主 div 高度:自动。但它不起作用。
代码:
<div id='Div1' style="background-color: #F5F5F4; width: 100%; height:auto; padding: 15px;">
只有 div 的顶部显示背景颜色。
最佳答案
样式属性必须为overflow: auto
,如果内容超过预定义的高度,则会呈现滚动条
关于asp.net - html高度:auto is not working,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9358747/