0
即時只是困惑爲什麼我的代碼在CSS不起作用。 即時使用codeigniter爲這個項目。@字體臉不工作在codeigniter
我有一個名爲'Viner Hand ITC'的字體,我把所有的格式放在我的根目錄下,名爲'font'的子文件夾,但它不起作用。
只是檢查了這一點。
@font-face {
font-family: "Viner Hand ITC";
src: url('font/435028077-27990.eot');
src: url('font/435028077-27990.eot?#iefix') format('embedded-opentype'),
url('font/435028077-27990.svg#Viner Hand ITC') format('svg'),
url('font/435028077-27990.woff') format('woff'),
url('font/435028077-27990.ttf') format('truetype');
font-weight: normal;
font-style: normal;
}
body {
background : #000!important;
color: #fff;
text-align: justify;
font-family: "Viner Hand ITC"!important;
direction: ltr;
}
但是當我打開我的網頁它總是使用默認的字體..
你的CSS文件在哪裏與根有關?除非CSS文件直接位於根文件夾內,否則您的路徑是錯誤的。 –