如果它安装在用户的计算机中,我想在网站中使用"Segoe UI"字体.
我已经声明了所有的样式,@font-face以便使用font-weight属性来改变字体的厚度(这是一个非常酷的功能!).
问题是我无法使用Segoe UI Bold(我认为名称错误).任何的想法?
这是一个例子.(4)和(5)将是相同的:http://jsfiddle.net/kxHQR/1/
@font-face {
font-family: 'Myname';
font-style: normal;
font-weight: 700;
src: local('Segoe UI Bold'), local('SegoeUI-bold'), local('segoeuib');
}
@font-face {
font-family: 'Myname';
font-style: normal;
font-weight: 600;
src: local('Segoe UI Semibold'), local('SegoeUI-Semibold');
}
@font-face {
font-family: 'Myname';
font-style: normal;
font-weight: 400;
src: local('Segoe UI'), local('SegoeUI');
}
@font-face {
font-family: 'Myname';
font-style: normal;
font-weight: 300;
src: local('Segoe UI Light'), local('SegoeUI-Light');
}
/* ... */
BODY {
font-family: 'Myname';
} …Run Code Online (Sandbox Code Playgroud) 我以这种方式使用SVG符号,但是display:noneSVG的隐藏了图形的渐变。任何的想法?
在下面的示例中,应该有两个圆圈,但是红色圆圈被隐藏了:
<svg xmlns="http://www.w3.org/2000/svg" style='display:none' >
<defs>
<style>.red-gradient{fill:url(#gradient)}</style>
<linearGradient id="gradient" x1="0" x2="0" y1="0" y2="1">
<stop offset="0%" stop-color="red"/>
<stop offset="100%" stop-color="darkred"/>
</linearGradient>
</defs>
<symbol id="mysymbol" viewBox="0 0 100 100">
<circle class="red-gradient" cx="0" cy="50" r="50" />
<circle fill="green" cx="100" cy="50" r="50" />
</symbol>
</svg>
<svg><use xlink:href="#mysymbol" /></svg>Run Code Online (Sandbox Code Playgroud)