windows电脑无法直接使用苹方字体,即使字体中安装苹方字体也无法直接在css中使用,需要从外部引入苹方字体,具体方法,我后续写一篇文章出来,先提供一个解决方案
将以下代码复制到app.wxss中,然后在index.wxss中的.container text的font-family: PingFang Light;
PS:我这边使用的是PingFang Light字体,而非PingFang Thin哈
@font-face {
font-family: 'PingFang Light';
src: url(data:application/font-woff;charset=utf-8;base64,d09GRgABAAAAAAcYAA0AAAAACjQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABGRlRNAAAG/AAAABwAAAAcfxoHtUdERUYAAAbcAAAAHgAAAB4AKQAST1MvMgAAAZwAAABSAAAAYGeUCCNjbWFwAAACEAAAAEwAAAFCDB0T+Wdhc3AAAAbUAAAACAAAAAj//wADZ2x5ZgAAAngAAAMmAAAEMAF83QJoZWFkAAABMAAAADYAAAA2Cu5XjmhoZWEAAAFoAAAAHgAAACQGYgKZaG10eAAAAfAAAAAgAAAAIAhrAgZsb2NhAAACXAAAABoAAAAaBbwExG1heHAAAAGIAAAAFAAAACAAEABCbmFtZQAABaAAAAEFAAACSVhXw4Vwb3N0AAAGqAAAACsAAAA6AAMAgwABAAAAATMz2AUM518PPPUACwPoAAAAANGAbdoAAAAA1/Vy0gAd//ICPALYAAAACAACAAAAAAAAeNpjYGRgYFH5t4aBgfkFAxAw2TAwMqACFgBSCgMCAAB42mNgZGBg4GFwYmBmwAoACDoAU3jaY2BhimCcwMDKwMD4hfELAwOMBmJ5hhMcjEzcTAwQsICB6b8AhCkGIhwDAnwYHBgMGSyZY/6XME5gUWEMYWBhYATJMUUwxwApBQZGAPiLDhoAAAPoAH8AAAAAAU0AAAJYAH0ASwBAAB0AQABAAEoANgBAeNpjYGBgZoBgGQZGBhCwAfIYwXwWBgUgzQKEIL7l//9A0vD///+XoCoZGNkYYEwGRiYgwcSAChgZMAEzCysbOwcnFzfDsAAArYYHMgAAACQAJAAkADwAcgC8ANoBFgFeAXIB0gIYAAB42nWSTUwTQRiGZ6ZYFCpabAVBKe1Kl7J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