我正在为网站使用“ San Fransisco”字体。
它可以在Ubuntu和Macos high sierra打开的所有浏览器上正常工作。但不适用于Windows打开的浏览器。
@font-face {
font-family: "San Francisco Thin";
font-weight: 300;
font-style: normal;
src: url("../fonts/Thin/SanFranciscoDisplay-Thin.otf") format("opentype"), url("../fonts/Thin/SanFranciscoDisplay-Thin.eot?#iefix") format("embedded-opentype"), url("../fonts/Thin/SanFranciscoDisplay-Thin.woff2") format("woff2"), url("../fonts/Thin/SanFranciscoDisplay-Regular.woff") format("woff"), url("../fonts/Thin/SanFranciscoDisplay-Thin.ttf") format("truetype"), url("../fonts/Thin/SanFranciscoDisplay-Thin.svg#San Francisco Thin") format("svg");
}
@font-face {
font-family: "San Francisco Regular";
font-weight: 400;
font-style: normal;
src: url("../fonts/Regular/SanFranciscoDisplay-Regular.otf") format("opentype"), url("../fonts/Regular/SanFranciscoDisplay-Regular.eot?#iefix") format("embedded-opentype"), url("../fonts/Regular/SanFranciscoDisplay-Regular.woff2") format("woff2"), url("../fonts/Regular/SanFranciscoDisplay-Regular.woff") format("woff"), url("../fonts/Regular/SanFranciscoDisplay-Regular.ttf") format("truetype"), url("../fonts/Regular/SanFranciscoDisplay-Regular.svg#San Francisco Regular") format("svg");
}
@font-face {
font-family: "San Francisco Medium";
font-weight: 500;
font-style: normal;
src: url("../fonts/Medium/SanFranciscoDisplay-Medium.otf") format("opentype"), url("../fonts/Medium/SanFranciscoDisplay-Medium.eot?#iefix") format("embedded-opentype"), url("../fonts/Medium/SanFranciscoDisplay-Medium.woff2") format("woff2"), url("../fonts/Medium/SanFranciscoDisplay-Medium.woff") format("woff"), url("../fonts/Medium/SanFranciscoDisplay-Medium.ttf") format("truetype"), url("../fonts/Medium/SanFranciscoDisplay-Medium.svg#San Francisco Medium") format("svg");
}
@font-face {
font-family: "San Francisco Bold";
font-weight: 600;
font-style: normal;
src: url("../fonts/Bold/SanFranciscoDisplay-Bold.otf") format("opentype"), url("../fonts/Bold/SanFranciscoDisplay-Bold.eot?#iefix") format("embedded-opentype"), url("../fonts/Bold/SanFranciscoDisplay-Bold.woff2") format("woff2"), url("../fonts/Bold/SanFranciscoDisplay-Bold.woff") format("woff"), url("../fonts/Bold/SanFranciscoDisplay-Bold.ttf") format("truetype"), url("../fonts/Bold/SanFranciscoDisplay-Bold.svg#San Francisco Bold") format("svg");
}
@font-face {
font-family: "San Francisco SemiBold";
font-weight: 600;
font-style: normal;
src: url("../fonts/SemiBold/SanFranciscoDisplay-SemiBold.otf") format("opentype"), url("../fonts/SemiBold/SanFranciscoDisplay-SemiBold.eot?#iefix") format("embedded-opentype"), url("../fonts/SemiBold/SanFranciscoDisplay-SemiBold.woff2") format("woff2"), url("../fonts/SemiBold/SanFranciscoDisplay-SemiBold.woff") format("woff"), url("../fonts/SemiBold/SanFranciscoDisplay-SemiBold.ttf") format("truetype"), url("../fonts/SemiBold/SanFranciscoDisplay-SemiBold.svg#San Francisco SemiBold") format("svg");
}
body {
* {
color: $superDarkGray;
font-family: -apple-system, 'San Francisco Regular';
}
}
所有路径都是正确的
我的代码错误是什么?