您好,欢迎来到知库网。
搜索
您的当前位置:首页div+css如何实现最小高度。_html/css_WEB-ITnose

div+css如何实现最小高度。_html/css_WEB-ITnose

来源:知库网

要求:在不同的浏览器下,要求字多的时候,框会自动延伸,字少的情况下是200px,字没有的情况下还是这个高度。此例子主要用了(!important)

CSS代码:

*{padding:0; margin:0}body{ font-size:30px;padding:100px}.box{width:300px; height:auto !important; min-height:200px;border:5px solid #000000}

  

HTML代码:

View Code

 1 2 smart工作室
3 smart工作室
4 smart工作室
5 smart工作室
6 smart工作室
7 smart工作室
8 smart工作室
9 smart工作室
10 smart工作室
11 smart工作室
12 smart工作室
13 smart工作室
14 smart工作室
15

Copyright © 2019- zicool.com 版权所有 湘ICP备2023022495号-2

违法及侵权请联系:TEL:199 1889 7713 E-MAIL:2724546146@qq.com

本站由北京市万商天勤律师事务所王兴未律师提供法律服务