@font-face按照視頻里的設(shè)置了,頁面沒有任何顯示
我檢查了一下src鏈接的路徑?jīng)]有錯(cuò),但是不知道為什么就是頁面不顯示,起先以為是瀏覽器兼容問題,但是用了其他瀏覽器,也還是沒有顯示??望大神搭救!!
以下是我截取跟字體設(shè)置有關(guān)的代碼
@font-face{ font-family:?"raphaelicons"; src:url("fonts/raphaelicons-webfont.eot")?format("eot"), url("fonts/raphaelicons-webfont.ttf")?format("ttf"), url("fonts/raphaelicons-webfont.woff")?format("woff"), url("fonts/raphaelicons-webfont.svg")?format("svg"); font-weight:normal; font-style:?normal; } [data-icon]:after{ content:?attr(data-icon); width:?200px; height:?200px; /*background:?#0f0;*/ color:?#fff; font-size:?90px; text-align:?center; line-height:?200px; position:?absolute; left:?50%; top:?50%; margin:?-110px?0?0?-65px; -webkit-transform:translateY(25%)?rotate(-45deg); font-family:?"raphaelicons"; }
2015-10-25
以解決,是src鏈接路徑問題,哈哈,正確路徑應(yīng)該是
src:url("../fonts/raphaelicons-webfont.eot") format("ttf"),
url("../fonts/raphaelicons-webfont.ttf") format("ttf"),
url("../fonts/raphaelicons-webfont.woff") format("woff"),
url("../fonts/raphaelicons-webfont.svg") format("svg")