2015-07-13 62 views
0

我有一個問題,我不能修理線剎車。跨度元素內的文字 剎車線在字中間。檢查第一張圖片。CSS剎車線但不是字

enter image description here

我想要做的是行至制動當一個字結束。 檢查例如:

enter image description here

任何想法?

當前HTML:

<div class="hgroup"> 
    <h1 class="fancy-title"> 
    <span>Leisure &amp; Entertainment</span> 
    </h1> 
</div> 

當前CSS:

.hgroup{width:200px !important; float: left !important; margin-left:0px !important; display: inline-block !important; } .hgroup .fancy-title { margin-left: 0px !important; display} .hgroup .fancy-title span{-webkit-text-fill-color:#444 !important;} 
+0

有你找到任何解決辦法?因爲我看起來一樣 – vivekkupadhyay

回答

1

設置white-spacebreak-all會得到一個結果一樣在不打破這個詞的演示。

.test { 
 
    white-space:break-all; 
 
    
 
    width:130px; 
 
    background:yellow 
 
}
<div class="test">Leisure & Entertainment</div>

+0

仍然沒有在我身邊工作。只是爲了讓您知道文本在span元素內。我添加空白:打破所有;跨度元素,沒有任何反應! – AXheladini