结构是
<div ID="container"><div ID="top"> top variable height</div><div ID="bottom">bottom variable height</div>
你可以看到一个Jsfiddle here
知道怎么做吗?谢谢
解决方法 您可以使用Flex属性执行此 *** 作.小提琴:https://jsfiddle.net/9vq8nkpc/
HTML
<div ID="container"> <div ID="top"> top variable height </div> <div ID="bottom">bottom variable heighbottom variable heightbottom variable heightbottom variable heightbottom variable heightbottom variable heightbottom variable heightbottom variable heightbottom variable heightbottom variable heightbottom variable heightbottom variable heightbottom variable heightbottom variable heightbottom variable heightbottom variable heightbottom variable heightbottom variable heightbottom variable heightt</div></div>
CSS
#container { border: 1px solID red; height: 200px; position: absolute; display:flex; flex-direction:column; justify-content:space-between;}#top,#bottom { border: 2px solID red; background: #ccc; wIDth:80%; display: inline-block;}总结
以上是内存溢出为你收集整理的html – 2行,首先在父级的底部,第二个在底部全部内容,希望文章能够帮你解决html – 2行,首先在父级的底部,第二个在底部所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)