DIV+CSS 自适应高度_百度知道
DIV+CSS 自适应高度
默认高度为200PX,兼容火狐浏览器,当DIV里内容超出限定时,DIV自适应高度, 要求使用纯CSS+DIV,不需要JS,,有一DIV,
提问者采纳
auto !important,7,*假定最低高度是200px*/,height,min-height,200px, /,火狐等都能兼容, 这个设置,200px,ie6,8 ,,,height,
提问者评价
楼下的也十分正确,采纳第一个回答的吧,下次一定问你
你可以把左右的最外的DIV的margin-bottom值,设为-9999,然后再把padding-bottom的值设为:9999,这样,DIV就可以自由增大,而背景也不会被改动。
其他类似问题
按默认排序
其他2条回答
中华人民共和国<, width,200px},text/,<,min-height,org/1999/xhtml" target="_blank">http,min borders",<,<,>,br /,/, 加这个最小高度就可以了<,/,solid 1px #06F}<,中华人民共和国中华人民共和国中华人民共和国中华人民共和国<,<,/,html xmlns=",<,中华人民共和国<,<a href="http,>,org/1999/xhtml",100px,div>,borders{ border,//www,>,<,css",<,w3,中华人民共和国<, /,br /,//www,br /,w3,title>,>,>,>,meta http-equiv=",html,head>,div class=",br /,Content-Type",text/,,/, content=",body>, charset=utf-8",<,中华人民共和国<,无标题文档<,/,style type=",title>,html>,,min{ min-height,style>,body>,head>,>,>,/,<,100px,
下载知道APP
随时随地咨询
出门在外也不愁IE7、FF DIV高度不能自适应问题的解决方案 - CSS教程 - CND8学院
热门标签:
您的位置: &
IE7、FF DIV高度不能自适应问题的解决方案
发布日期:日
解决方法小结:1、父元素也浮动 (没有指定宽度的float应当伸缩包装到浮动内容的宽度)2、clear属性3、为父层设置 {overflow: _height:1%;} 前者针对火狐IE7(overflow:auto 或hidden) 后者针对IE6(_height:1% 或he\ight:1%)* html .clear{height:1%}4、父元素设置高度宽度5、针对 火狐#d1:after{content:".";height:0;visibility:display:clear:
其他小技巧:
html也要设置100%&&&& ,对后面的div可能会有影响html,body{height:100%;margin:0;}
设置 div为绝对定位. style="width:500 height:100%! background:#003333; position:"./#/需要自动高度的地方{min-height:500height:/*IE7*/_height:500/*IE6*/display:/*firefox,opera*/}
在FF下一个自适应高度的简单做法
加上height: 100%;overflow:
自动换行的简单做法
table-layout:WORD-BREAK: break-WORD-WRAP: break-
怎样用CSS把层做成半透明?
用下面的样式表定义你的层.alpha { filter: Alpha(Opacity=50, FinishOpacity=50, Style=0, StartX=0, StartY=0, FinishX=100, FinishY=100}
解释:Opacity=开始的不透明度(100的话就不透明了)FinishOpacity=结束的不透明度(100的话就不透明了)Style=样式,从0开始,1.2.3....有均匀透明啊,放射形状透明啊...StartX=开始透明的X坐标,基本上为图片、层的左上角(0)StartY= 开始透明的Y坐标,基本上也为图片、层的左上角(0)FinishX=结束透明的X坐标,基本上也图片、层的右下(图片、层的宽度)FinishY=结束透明的Y坐标,基本上也为图片、层的右下角(图片、层的高度)
相关教程:最新教程:500 - 内部服务器错误。
500 - 内部服务器错误。
您查找的资源存在问题,因而无法显示。按 & & 方向键翻页看更爽
扫描二维码,用手机看博客
  
& &&京ICP备号ie 下 height:auto 怎么才能自适应高度_百度知道
ie 下 height:auto 怎么才能自适应高度
div id=", left,div>,/,ui-widget-content", z-index,div>, 0px,footer", height,leftside", 100%,>, top, 2, 100%,大概比如有这么3个DIV吧 第一个是在顶部的第三个是在底部的 第二个是在中间的那么比如我顶部设置了height, hidden, text-align, width,div id=", ff
<, hidden,缺是根据内容自适应的怎么样才能完成我这样的布局呢, 50px, 16px, top <, 50px, hidden,>,<, }
#footer { position, 1px solid #AAAAAA,auto,40px底部设置了height, 16px, bottom,div id=", width, <, 36px, overflow, 37px, border, z-index, class=", overflow,div>, absolute,>, right,/, 2, text-align,
<,, center, absolute,auto, bottom, width, footer <, absolute, 2,38px我希望中间的div进行自适应高度#header { position, }
#leftside {height, border, 0px, z-index, center, }奇怪的是在firefox中可以完全符合我的需求 在IE7中第二个div height, 180px, right, 0px, height, height, border,header", overflow, 1px solid #AAAAAA, 1px solid #AAAAAA,/, position,
提问者采纳
中间能高度自动了,height,div>,,left,header",left,<,header{width,height,div class=“layout”>, float, float,left,<,style>, float,auto,49px,center{width,center",},height,头部<,底部<,height,div class=",/,/,>,auto,},bottom{width,>,900px,900px,bottom",div>, float,}<,/,900px,中间<,<,},div class=",div>,div class=",>,left,/,<,auto,style>,<,div>,layout{width,/,<,900px,
提问者评价
其他类似问题
按默认排序
其他1条回答
<, /, <,#CCC,div id=",p>, height,}#continer { width,
<,html>,relative,/,右边<, center,/,div>,}#leftside { width,}-->,
<,middle",/,p>,0 auto,
<, background-color,p>,}#rightside { width,/,p>, <,body>,
<,你看看吧,中间左右两个块可以随内容自适应高度。-----------------------------------代码-----------------------------------------<,/,div>,auto,/,<,title>,right,text/,/, <,#CCC,test<,
<,p>,>,style type=",<, 800px, text-align,>,左边<,div id=",leftside",p>,both,p>, width, width,/,div id=", background-color,auto,/,>,800px,footer",p>, float,你试试这么写,}#footer { position,p>,title>,head>,
<,p>,continer", 50px,!--* { padding,style>,/,-------------------------------------------代码---------------------------------------------, clear, float,
<,顶部<,/, <, <,0px,
<,p>,/,relative,在firefox和IE中都可以,<,/,css", margin,/,left,#30F,>,<,
<,<,/,<,
<,/,<, background-color,<,div id=", <, margin,header",}#middle { position,
<,p>, 36px,
<,div>, height,180px,div>, width,固定宽度且居中 }#header { position,p>,div id=",
<, text-align, <,p>, <, text-align, center,>,p>,div>,/,div>,p>,p>,body>, height, height,620px,head>, center,p>, 800px,/,/,/, 800px,html>,
<,p>, background-color,<,rightside",>,
<,div id=",0px,>,relative,底部<,/,不知道这个是不是你想要的效果,p>,#0F0,/,
自适应的相关知识
等待您来回答
下载知道APP
随时随地咨询
出门在外也不愁