使用calibri样式为mac,ios,linux [英] to use calibri style for mac,ios,linux
问题描述
由于calibri的风格是在Windows操作系统,但calibri风格是不是在linux,mac,ios.If我的项目是有它的风格只有在calibri(我strickly必须使用它),所以如果用户使用linux和运行我的项目,然后我的项目的外观将改变,如果我复制/安装calibri在我的linux,它将显示在我的系统只。我做到了在我的项目的war文件夹我复制calibri在ttf,otf,eot,woff形式,但仍然没有变化。我应该怎么做,使用calibri样式为我使用的所有OSThe CSS。
As the calibri style is there in the Windows O.S but the calibri style is not there in the linux,mac,ios.If my project is having its style only in calibri(and I strickly have to use it)so if the user using the linux and run my project then my look of the project will change and if I copy/install the calibri in my linux it will be shown on my system only.I have done that in the war folder of my project I copy the calibri in ttf,otf,eot,woff form but still no change.So what should I do to use the calibri style for all the O.S.The css I used.
.pop
{
border:1px solid black ;
width:500px;
height:140px;
background-color: #d1d4d5;
position:absolute;
z-index: 1;
cursor:pointer;
font-family:calibri;
}
public static native void hello()
/*-{
var body=$doc.getElementsByTagName("body")[0];
var popuptext=$doc.createTextNode(".......");
popup.className="pop";
popup.appendChild(popuptext);
}-*/;
推荐答案
如果您的系统中有calibri字体,在服务器上上传字体,然后在CSS中提供路径。您需要不同的类型格式,以便在所有浏览器上完美显示字体。
If you have the calibri font in your system then you've to upload the font on the server and then provide the path in CSS. ofcourse you need different type format so font render perfectly on all browser.
body {
font-family: 'Calibri', Fallback, sans-serif;
}
@font-face {
font-family: 'Calibri';
src: url('Calibri.eot'); /* IE9 Compat Modes */
src: url('Calibri.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
url('Calibri.woff') format('woff'), /* Modern Browsers */
url('Calibri.ttf') format('truetype'), /* Safari, Android, iOS */
url('Calibri.svg#svgFontName') format('svg'); /* Legacy iOS */
}
这篇关于使用calibri样式为mac,ios,linux的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!