2
我有以下代碼,我希望紅色文本中的文本響應/環繞黃色框。這甚至可能(理想情況下沒有JS)?跨度內容超過兩個div
#div1 {
float: left;
width: 300px;
}
#div2 {
float: left;
width: 50%;
background-color: blue;
}
#div3 {
float: left;
width: 50%;
background-color: red;
}
p span {
width: 250px;
height: 50px;
left: 20px;
display: inline-block;
clear: both;
float: left;
background-color: yellow;
position: relative;
}
<div id="div1">
<div id="div2">
<p>Bonorum has. His ut cibo quas tantas, vis ut probo adhuc definiebas, has at meis debet vulputate. No sed velit essent suavitate,
<span>overlap me</span> \t in pro decore ceteros temporibus, usu in odio offendit theophrastus. Mel labore indoctum cu, ad soleat admodum delicatissimi sed, mei viris tritani ullamcorper eu. Ut vim simul aperiam.</p>
</div>
<div id="div3">
<p>Bonorum has. His ut cibo quas tantas, vis ut probo adhuc definiebas, has at meis debet vulputate. No sed velit essent suavitate, in pro decore ceteros temporibus, usu in odio offendit theophrastus. Mel labore indoctum cu, ad soleat admodum delicatissimi
sed, mei viris tritani ullamcorper eu. Ut vim simul aperiam.</p>
</div>
</div>
我真的不這麼認爲這個標記:/ –
在黃色的div裏會不會有文字?我認爲如果不是這樣的話可能會離開。 – JamieC
這將是一個Youtube視頻... – Ukuser32