2017-08-30 69 views
0

我的代碼是:使文本fixt到一個區域

<div class="col-xs-12 col-sm-6 col-md-6 col-lg-3"> 
 
    <div class="statistic-box statistic-filled-1"> 
 
    <h1><span class=count-number>5251111111</span>TL</h1> 
 
    <span class=slight><i class="fa fa-play fa-rotate-270 text-warning"> </i> 28%</span> 
 
    <div class=small>Stok</div> 
 
    <div> 
 
     <a href=stok> <i class="ti-server statistic_icon"></i></a> 
 
    </div> 
 
    </div> 
 
</div>

this is not wanted

我要編輯的文本,以便它會適合,而不是擾亂服務器映像,是無論如何,使這成爲可能?

+0

更改字體大小?改變跨度的寬度?你有什麼選擇你嘗試過什麼? – scrappedcola

回答

0

您可以將圖片設置爲divs背景圖片&然後在div上設置填充。

+0

我該如何做到這一點我是非常初學者,你可以鏈接我嗎? –

+0

我想我有一個解決方案添加一個float:right;到服務器映像的css。這樣文字將環繞圖像。你可以使用這個:word-wrap:break-word;在包含文本的框中,以便它將換行到下一行。 – starsg38

+0

另一種解決方案可能是將「statistic-box statistic-filled-1」的寬度設置爲75%(或任何適合的數字),然後您可以將font-size設置爲font-size:5vh並調整大小基於div的寬度 – starsg38

0

沒有看到你的CSS,看起來你可能在你的一個div元素上使用了background-image屬性。出現在它上面的文字是它如何工作的。

如果你不想讓這個圖像成爲背景的一部分,那麼我建議刪除該屬性,而不是在HTML中插入一個好的老式<img>元素。