
我的标记示例可在此处获取 – http://codepen.io/calebo/pen/CGoyD
解决方法 试试这个:.main { background: tomato; float: left; wIDth: 600px; margin-top: 30px; /* above Layout adjustment */ /* removed overflow: hIDden; */ /* use always clearfix method instead */}.article_header { background: SteelBlue; color: #fff; position: absolute; bottom: 100%; margin-bottom: 10px; /* to neutralize padding of parent container */ left: -10px; /* to neutralize padding of parent container */ padding: 10px; /* to neutralize padding of parent container */ right: -330px; /* to neutralize padding of parent container */}.main > article{ position: relative;}.asIDe { background: cyan; float: right; wIDth: 300px; margin-top: 30px; /* above Layout adjustment */} Working Codepen
要进行调整,请使用保证金属性.
总结以上是内存溢出为你收集整理的html – 将子内容定位在父容器之外全部内容,希望文章能够帮你解决html – 将子内容定位在父容器之外所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)