在这个示例中,由于我们在全局 CSS 中已经将 body 的font-family 设置为 'SourceHanSans',所以 .title 和.content 类中的文本都会使用思源黑体进行渲染。 通过以上步骤,你就可以在 uniapp 项目中成功使用思源黑体了。
{font-family:'黑体';font-size:12.0pt;}span.X5Char{font-family:'黑体';font-size:12.0pt;}span.X6Char{font-family:'黑体';font-size:12.0pt;}span.X7Char{font-weight:bold;}span.X8Char{font-family:'Arial';}span.X9Char{font-family:'Arial';font-size:16.0pt;}span.a5{font-family:'Arial';...
Cloud Studio代码运行 /* 假设字体文件名为 MyFont.woff,并放在 static/fonts 文件夹下 */@font-face{font-family:'MyFont';/* 你可以给字体起一个别名 */src:url('~@/static/fonts/MyFont.woff')format('woff'),/* 注意路径可能需要根据你的项目结构进行调整 */url('~@/static/fonts/MyFont.woff2'...
{ padding: 40rpx 0; font-size: 34rpx; font-family: '黑体'; } .leave_cont .ul .li .flex1 { flex: 1; text-align: right; padding-right: 25rpx; color: #999999; font-size: 32rpx; } .date { height: 42rpx; } } .clientsList {} } } } </style> 二、 <template> <view ...
*/src: url('https://7463-tcb-reu231fdsroklfql25373e40-8cac7c-1304419594.tcb.qcloud.la/字体包/SourceHanSansCN-Medium.otf')format('opentype');font-weight: normal;font-style: normal;}@font-face{font-family: "Normal";/* src: url('~@/common/SourceHanSansCN/SourceHanSansCN-Normal.otf'...
{font-family:'黑体';font-size:12.0pt;}span.X5Char{font-family:'黑体';font-size:12.0pt;}span.X6Char{font-family:'黑体';font-size:12.0pt;}span.X7Char{font-weight:bold;}span.X8Char{font-family:'Arial';}span.X9Char{font-family:'Arial';font-size:16.0pt;}span.a5{font-family:'Arial';...