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

feat: 补充 style 引入非 static 目录资源示例

上级 ebf71740
......@@ -4,25 +4,44 @@
<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: AlimamaDaoLiTiOTF">font-family: 阿里妈妈刀隶体-otf</text>
<!-- <text class="common" style="font-family: AlimamaDaoLiTiWOFF">font-family: 阿里妈妈刀隶体-woff</text>
<text style="font-family: UniFontFamily;">style 加载非 static 目录字体文件:{{uniIcon}}</text>
<!-- <text class="common" style="font-family: AlimamaDaoLiTiWOFF">font-family: 阿里妈妈刀隶体-woff</text>
<text class="common" style="font-family: AlimamaDaoLiTiWOFF2">font-family: 阿里妈妈刀隶体-woff2</text> -->
</view>
</template>
<script lang="uts">
export default {
data() {
return {
uniIcon: '\ue100',
}
}
}
</script>
<style>
.common {
font-size: 20px;
line-height: 40px;
}
@font-face {
font-family: AlimamaDaoLiTiTTF;
src: url('https://native-res.dcloud.net.cn/uni-app-x/static/font/AlimamaDaoLiTi.ttf');
}
@font-face {
font-family: AlimamaDaoLiTiOTF;
src: url('/static/font/AlimamaDaoLiTi.otf');
}
/* @font-face {
@font-face {
font-family: UniFontFamily;
src: url('./uni.ttf');
}
/* @font-face {
font-family: AlimamaDaoLiTiWOFF;
src: url('/static/font/AlimamaDaoLiTi.woff');
}
......@@ -30,4 +49,4 @@
font-family: AlimamaDaoLiTiWOFF2;
src: url('/static/font/AlimamaDaoLiTi.woff2');
} */
</style>
</style>
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册