问题:
为什么div没有高度,必须要设置height才行? 它不能自动扩充为内里内容的高度吗?
<div class="tools_r_mail"> <a class="btn_mail" href="/Mail/Write/79?typeId=21"> <span>回 复</span></a> <a class="btn_mail" href="/Mail/Write/79?typeId=24"> <span>回复所有</span></a></div>
回复讨论(解决方案)
你问的问题和你发的代码有关系吗?
你问的问题和你发的代码有关系吗?
因为我在div里边设置了背景,结果发现效果没出来。
后边要设置height才行
但是里边不是有内容吗?
回 复
回复所有
我以为div会自动扩张,把上边内容包括进来
<style type="text/css">.tools_r_mail { font:12px; height:800px; color:#339966; border:1px #e1763d solid;}</style>
<style type="text/css">.tools_r_mail { font:12px; height:800px; color:#339966; border:1px #e1763d solid;}</style>就是说必须要设置 height对吧?
<style type="text/css">.tools_r_mail { font:12px; height:800px; color:#339966; border:1px #e1763d solid;}</style> 就是说必须要设置 height对吧?
父元素没有高度
height:auto;











