2016-11-14 79 views
-1

如何從Ion圖標的頂部和底部刪除間距?IonIcons刪除間距

我用它在我的HTML這樣的:

<div><i className="close ion-ios-close-empty" /></div>

,這是所有ionicons默認樣式:

display:inline-block; 
font-family:"Ionicons"; 
speak:none; 
font-style:normal; 
font-weight:normal; 
font-variant:normal; 
text-transform:none; 
text-rendering:auto; 
line-height:1; 
font-size: inherit; 
-webkit-font-smoothing:antialiased; 
-moz-osx-font-smoothing:grayscale 

,並關閉類如下:

.close{ 
    color: #ffffff; 
    font-size: 50px; 
} 

enter image description here

我沒有添加任何樣式,我只增加字體大小,但圖標顯示在照片上。

有什麼方法可以去除頂部和底部的間距?

+0

請問您能提供最少的代碼嗎! – Aroniaina

+0

@Aroniaina這是默認代碼。就像通過字體真棒。我添加了它。 – Boky

+0

請檢查此:[如何創建一個最小,完整和可驗證的示例](http://stackoverflow.com/help/mcve) –

回答

0
use line height property 
example : { 
line-height: 1; 
} 
+0

它已經是1 – Boky

+0

然後設置高度多少你想和調整負邊距 –