【发布时间】:2018-10-03 17:13:21
【问题描述】:
细分:
@font-face {
font-family: 'RobotoLight';
src: url('../font/jura-demibold.eot');
src: url('../font/jura-demibold.eot?#iefix') format('embedded-opentype'),
url('../font/jura-demibold.woff') format('woff'),
url('../font/jura-demibold.ttf') format('truetype'),
url('../font/jura-demibold.svg#RobotoLight') format('svg');
font-weight: normal;
font-style: normal; }
从the post,我了解到它的价值是comma-separated 列表的优先级。然后,从the post,我了解到这种url的布局是为了浏览器的兼容性(尤其是ie9)。
但是,我还是不知道semicolon的优先级,所以我很困惑,为什么我从来没有见过下面这样的布局?它是正确的版本吗?
@font-face {
font-family: 'RobotoLight';
src: url('../font/jura-demibold.eot') format('eot'),
src: url('../font/jura-demibold.eot?#iefix') format('embedded-opentype'),
url('../font/jura-demibold.woff') format('woff'),
url('../font/jura-demibold.ttf') format('truetype'),
url('../font/jura-demibold.svg#RobotoLight') format('svg');
font-weight: normal;
font-style: normal; }
【问题讨论】:
-
仅供参考:
../font/jura-demibold.eot中的..如果在 Web 请求中使用,则没有任何意义。这是向上移动一个目录的文件系统快捷方式,但 URL 不像文件系统那样工作。 -
@JDB 好的,我只是从一个网站中提取片段。