0
我有一個SVG文件中定義一個「十」字狀符號作爲中心自定字形元素
<glyph unicode="" d="M784.646 720.646c-30.038 30.038-79.328 30.038-109.367 0l-163.282-163.282-163.282 163.282c-30.038 30.038-79.328 30.038-109.367 0s-30.039-79.328 0-109.367l163.282-163.282-163.282-163.282c-30.039-30.038-30.039-79.328 0-109.367s79.328-30.038 109.367 0l163.282 163.282 163.282-163.282c30.038-30.038 79.328-30.038 109.366 0s30.038 79.328 0 109.367l-163.282 163.282 163.282 163.282c30.038 30.038 30.038 79.328 0 109.366z" />
我試圖把這個圖標,僞元素的CSS,因爲我有HTML
<span class="icon icon-close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true"></span></span>
和CSS
.icon-close:before {
content: '\e604';
color: #474747;
}
但是在元件的橫由1個像素取決於彈出的地方漂流出現在屏幕上(十字圖標意味着是在彈出的關閉按鈕)
漂移到左: 漂移到右:(I得到僞元件灰色背景來說明更清楚)
你有什麼想法,爲什麼發生這種情況,我應該如何使圖標堅持到中心?
嘗試調整字體大小,它可能是一個小故障。它發生在我用FontAwesome。 – Ciprian
嘗試使用icomoon服務,然而,你用哪個參數來生成這種字體? – FelipeAls
@Ciprian感謝您的建議,但調整大小不工作在我的情況下.. – user1038662