Css 如何使一个div溅到另一个上
我想创建一个wordpress网站,偶然发现了这个页面设计(它不是wordpress的) 如何为要溢出到的in_内容创建自定义css。texture2。如页面所示,定价表溢出到页面标题Css 如何使一个div溅到另一个上,css,wordpress,html,layer,Css,Wordpress,Html,Layer,我想创建一个wordpress网站,偶然发现了这个页面设计(它不是wordpress的) 如何为要溢出到的in_内容创建自定义css。texture2。如页面所示,定价表溢出到页面标题 thnx提前在顶部div上使用负边距底部。快速示例: <div style='width: 200px; height: 100px; margin-bottom: -50px; background-color: red;'> Lala </div> <div style='wid
thnx提前在顶部div上使用负边距底部。快速示例:
<div style='width: 200px; height: 100px; margin-bottom: -50px; background-color: red;'>
Lala
</div>
<div style='width: 100px; height: 100px; background-color: green;'>
Lala
</div>
拉拉
拉拉
在texture 2 div中,添加以下CSS属性:
position:relative and overflow:visible
现在,在in_content div中添加以下CSS规则:
margin-top: -30px; //you can adjust the px value to suit your preference
position: absolute;
现在应该溢出来了 实际上,这一页是一种“错觉”。两个div没有溢出。主包含div的蓝色背景仅向下延伸到目前为止,然后内部是title div(仅文本),下面是content div(但仍在蓝色背景上)。另外,请更改问题的措辞,以便遵循良好的命名惯例。也许你可以称之为“让一个div溢出到另一个div”