簡體   English   中英

是否可以在ap的最后一行旁邊流動div容器?

[英]Is it possible, to flow a div container right next to the last line of a p?

我正在創建一個WordPress模板。 我正在使用the_content(); 將文本寫在后端。 WordPress通常將其包裝在<p> 在the_content();之后; 我想要一個鏈接(該鏈接未寫入所見即所得編輯器),並且該鏈接位於div中。 現在,我希望<div>在p換行文本旁邊流動:

<p> Lorem ipsum dolor坐着,坐立不安,sed diam nonumy eirmod tempor invidunt ut Labore et dolore magna,sed diam。 </p> <div>我的鏈接</div>

謝謝!

我無法正確理解您的問題,但我認為您的意思是

 .inline { display: inline; } 
 <div> <p class="inline">Content is here</p> <div class="inline"><a href="">The link</a></div> </div> 

您可以使用CSS display:inline和display:inline-block來做到這一點

使用內聯塊

  <p style="display: inline-block;"> Content of p tag </p> <div style="display: inline-block;"> <a href="#">Content of div tag </a></div> 

使用內聯:

 <p style="display: inline;"> Content of p tag </p> <div style="display: inline;"> <a href="#">Content of div tag </a></div> 

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM