我已经尝试了好几天了,我无法理解。
我在VS中创建了一个ASP.NET Web Forms项目,它显示了用于加载字体的代码:
@font-face {
font-family: 'Glyphicons Halflings';
src: url('../fonts/glyphicons-halflings-regular.eot');
src: url('../fonts/glyphicons-halflings-regular.eot?#iefix') format('embedded-opentype'), url('../fonts/glyphicons-halflings-regular.woff') format('woff'), url('../fonts/glyphicons-halflings-regular.ttf') format('truetype'), url('../fonts/glyphicons-halflings-regular.svg#glyphicons-halflingsregular') format('svg');
}
我的代码中有这个:
@font-face
{
font-family: 'Raleway';
src: url('fonts/Raleway-Regular.eot'); /* IE9 Compat Modes */
src: url('fonts/Raleway-Regular.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
url('fonts/Raleway-Regular.woff2') format('woff2'), /* Apparently this fixes IE11 (source: https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face ) */
url('fonts/Raleway-Regular.woff') format('woff'), /* Modern Browsers */
url('fonts/Raleway-Regular.ttf') format('truetype'), /* Safari, Android, iOS */
url('fonts/Raleway-Regular.svg#iosfix') format('svg'); /* Legacy iOS */
}
它不起作用。任何修复/想法/想法?