我正在使用自定义字体样式在PhoneGap中执行应用程序.字体样式是在浏览器中,而不是在
Android手机中.
<style> @font-face { font-family: 'CooperStd'; src: url('fonts/cooperblackstd.eot'); src: url('fonts/cooperblackstd.eot?#iefix') format('embedded-opentype'),url('fonts/cooperblackstd.woff') format('woff'),url('fonts/cooperblackstd.ttf') format('truetype'),url('fonts/cooperblackstd.svg#CooperBlackStd') format('svg'); font-weight: 900; font-style: normal; } body{font-family:'CooperStd',arial ; } </style>
我检查了字体路径,它是正确的还在浏览器中检查控制台.我发现没有错误.
提前致谢
解决方法
你可以尝试从根文件夹的相对路径,而不是:
src: url('fonts/cooperblackstd.eot');
尝试
src: url('/fonts/cooperblackstd.eot');
假定字体是与www文件夹下的.html文件处于同一级别的文件夹.
问候,