提交 44c7d105 编写于 作者: DCloud-WZF's avatar DCloud-WZF 💬

feat(css): font-face support local dir

上级 1cb57341
<template> <template>
<view class="uni-padding-wrap"> <view class="uni-padding-wrap">
<text class="common" style="font-family: monospace" <text class="common" style="font-family: monospace">font-family: monospace</text>
>font-family: monospace</text <text class="common" style="font-family: cursive">font-family: cursive</text>
> <text class="common" style="font-family: AlimamaDaoLiTiTTF">font-family: 阿里妈妈刀隶体-ttf(网络字体下载后生效)</text>
<text class="common" style="font-family: cursive" <text class="common" style="font-family: AlimamaDaoLiTiOTF">font-family: 阿里妈妈刀隶体-otf</text>
>font-family: cursive</text <!-- <text class="common" style="font-family: AlimamaDaoLiTiWOFF">font-family: 阿里妈妈刀隶体-woff</text>
> <text class="common" style="font-family: AlimamaDaoLiTiWOFF2">font-family: 阿里妈妈刀隶体-woff2</text> -->
<text class="common" style="font-family: AlimamaDaoLiTiTTF"
>font-family: 阿里妈妈刀隶体-ttf(网络字体下载后生效)</text
>
<!-- <text class="common" style="font-family: AlimamaDaoLiTiOTF"
>font-family: 阿里妈妈刀隶体-otf</text
>
<text class="common" style="font-family: AlimamaDaoLiTiWOFF"
>font-family: 阿里妈妈刀隶体-woff</text
>
<text class="common" style="font-family: AlimamaDaoLiTiWOFF2"
>font-family: 阿里妈妈刀隶体-woff2</text
> -->
</view> </view>
</template> </template>
<style> <style>
.common { .common {
font-size: 20px; font-size: 20px;
line-height: 40px; line-height: 40px;
} }
@font-face {
@font-face { font-family: AlimamaDaoLiTiTTF;
font-family: AlimamaDaoLiTiTTF; src: url('https://native-res.dcloud.net.cn/uni-app-x/static/font/AlimamaDaoLiTi.ttf');
src: url('https://native-res.dcloud.net.cn/uni-app-x/static/font/AlimamaDaoLiTi.ttf'); }
} @font-face {
/* @font-face { font-family: AlimamaDaoLiTiOTF;
font-family: AlimamaDaoLiTiOTF; src: url('/static/font/AlimamaDaoLiTi.otf');
src: url('/static/font/AlimamaDaoLiTi.otf'); }
} /* @font-face {
@font-face { font-family: AlimamaDaoLiTiWOFF;
font-family: AlimamaDaoLiTiWOFF; src: url('/static/font/AlimamaDaoLiTi.woff');
src: url('/static/font/AlimamaDaoLiTi.woff'); }
} @font-face {
@font-face { font-family: AlimamaDaoLiTiWOFF2;
font-family: AlimamaDaoLiTiWOFF2; src: url('/static/font/AlimamaDaoLiTi.woff2');
src: url('/static/font/AlimamaDaoLiTi.woff2'); } */
} */ </style>
</style>
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册