2014-07-04 15 views
0

我目前正在處理佈局。 我需要把外部跨度元素p的最後一行使量程位於P的最後一行P

<p>I am here I am here I am here I am here I am here I am here </p><span>same line of the last line of paragraph </span> 

是否有任何CSS屬性將其存檔?

+1

贊[this](http://jsfiddle.net/qm3pe/)? –

回答

1
p{ 
display:inline-block; 
} 

p{ 
    float:left; 
    margin:0; 
    padding:0; 
} 
如果P元素是大於一行

將無法​​正常工作。我推薦

p{ 
display: inline; 
} 
1

應用此css來的p標籤

p{ 
display:inline-block; 
} 

工作代碼:JSFIDDLE