日期:2014-05-17  浏览次数:20509 次

散分~问个border的问题~`
在ff中,经常遇到border无法拉伸的问题,请问大家是如何解决的?我在网上搜索到float:inherit这个属性,但是如果该容器是float:left的话,那再加上这个不是冲突了吗?还有在没有使用position:absolute的情况下,position:relative这个属性起啥作用?

不好意思,本来想散200分的,不让我散。。。555,还害我重打一遍,郁闷~

------解决方案--------------------
width:auto;height:auto;
这样层就会自适应大小了。
------解决方案--------------------
position:relative 是相对于他本应该在的位置的定位, 设置了top,left…后原位置空间仍然占用保留,多试试就知道了
border没明白你的意思,设置了float:left后容器应该可以自适应了吧

<div style= "background:#ccc; width:300px; height:200px ">
<span style= "z-index:2;display:block;background:#eee; position:relative; top:30px; left:50px; height:50px; width:50px "> </span>
<span style= "z-index:1;display:block;background:#000; position:relative; top:-22px; left:48px; height:50px; width:50px "> </span>
</div>

<div style= "float:left; padding:5px; background:#eee; margin-top:10px; border:1px solid #000 ">
中 <br />
华 <br />
人 <br />
民 <br />
共 <br />
和 <br />
国 <br />
中 <br />
华 <br />
中华人民共和国

</div>
------解决方案--------------------
position:relative 是指定位其相对位置
------解决方案--------------------
关于CSS的问题,你加我QQ 17312929 一般都能解决的
------解决方案--------------------
你的“拉伸”指的是什么?