Html 插入更多文本时,增加div高度并动态向下移动其他div
当文本增加时,我很难用文本向下移动主div下的其他div。我用css尝试了很多次。当文本随着按enter键的次数增加时,文本div height将增加,但其他跳水动作不会移动。我对我的英语感到抱歉。我能为此做些什么 这是在插入文本之前 这是在插入文本之后 这是我的密码Html 插入更多文本时,增加div高度并动态向下移动其他div,html,css,Html,Css,当文本增加时,我很难用文本向下移动主div下的其他div。我用css尝试了很多次。当文本随着按enter键的次数增加时,文本div height将增加,但其他跳水动作不会移动。我对我的英语感到抱歉。我能为此做些什么 这是在插入文本之前 这是在插入文本之后 这是我的密码 <div style="width:795px; min-height:40px; background-color:#0099FF; position:absolute; left: 60px; top: 0p
<div style="width:795px; min-height:40px; background-color:#0099FF; position:absolute; left: 60px; top: 0px;padding-top:10px;padding-left:5px; color:#FFF;font-size:14px"></div>
<span style="width:795px; min-height:40px; background-color:#0099FF; position:absolute; left: 60px; top: 0px;padding-top:10px;padding-left:5px; color:#FFF;font-size:14px"><strong>Tomorrow can be too late..</strong></span>
<div style="width:100px; height:30px; background-color:#FBC81A; position:absolute; left: 757px; top: 40px; border-bottom-left-radius:5px;z-index:1;">
<div style="width:50px;height:30px; position:absolute; padding-top:3px;padding-left:13px;">
<input type="submit" name="btn_report" id="btn_report" value="" style="background-image:url(images/report.png);background-repeat:no-repeat;width:23px;height:23px;border:none;background-color:#FBC81A;cursor:pointer;" title="Report this post" />
</div>
<div style="width:50px; height:30px; position:absolute; left: 50px; background-color:#0C0; top: 0px;text-align:center;">
<div style="margin-top:7px;color:#FFF;font-weight:bold;cursor:pointer;" title="Post reputations">102</div>
</div></div>
<div style="width:795px; min-height:340px; background-color:#F3F8F8; position:absolute ; left: 59px; border-bottom-left-radius:10px; border-bottom-right-radius:10px; top: 40px; border-left:3px #0099FF solid;border-right:3px #0099FF solid;" >
<p>sds</p>
<p>d</p>
<p>sa</p>
<p>d</p>
<p>sad</p>
<p>s</p>
<p> </p>
<p>ds</p>
<p>ad</p>
<p>s</p>
<p> </p>
<p>d</p>
<p>dsa</p>
<p>das</p>
<p>d</p>
<p>sa</p>
<p>d</p>
<p>as</p>
<p>das</p>
<p>d</p>
<p>as</p>
<p>das</p>
<p>d</p>
<p>sa</p>
<p>d</p>
</div>
<div style="width:800px; min-height:25px; background-color:#0099FF; position:absolute; left: 60px; border-bottom-left-radius:10px; border-bottom-right-radius:10px; top: 355px;" ></div>
<div style="width:798px; min-height:20px; position:absolute; left: 62px; border-bottom-left-radius:10px; border-bottom-right-radius:10px; top: 380px;background-image:url(shadow_9.png);background-repeat:no-repeat;" ></div>
</div>
明天可能太晚了。
102
十二烷基硫酸钠
d
sa
d
悲哀的
ds
广告
d
数字减影
达斯
d
sa
d
作为
达斯
d
作为
达斯
d
sa
d
只需移动底部的条形图
:
在
中放置文本(在
标记下)并将其更改为:
<div style="width:800px; min-height:25px; background-color:#0099FF; position:relative; left: 0px; border-bottom-left-radius:10px; border-bottom-right-radius:10px; bottom: 0px;" ></div>
它会随着文本内容的移动而动态移动,这是因为
位置:绝对,左侧:60px
和顶部:355px
。这样,容器将始终位于屏幕上的相同位置。U必须使用位置:相对
,使用边距
而不是左
和右
。此外,div嵌套不正确
看看
它认为它能按你想要的方式工作。溢出:隐藏