在[html]标签的 sandbox iframe 里没有访问字体的权限,要测试可以前往这个页面:
我已经加了allow="local-fonts"但没效果,谁知道怎么正确添加权限?
<iframe class="useriframe" id="user_iframe_1" srcdoc="嵌入的网页代码" seamless="seamless" width="100%" height="300" style="border: none" allow="fullscreen local-fonts" sandbox="allow-forms allow-orientation-lock allow-pointer-lock allow-popups allow-presentation allow-scripts"></iframe>
<iframe class="useriframe" id="user_iframe_1" srcdoc="嵌入的网页代码" seamless="seamless" width="100%" height="300" style="border: none" allow="fullscreen; local-fonts" sandbox="allow-forms allow-orientation-lock allow-pointer-lock allow-popups allow-presentation allow-scripts"></iframe>
https://www.thewebmaster.com/html/attributes/allow/
<iframe src="[insert source]" allow="camera 'none'; microphone 'none'"></iframe>
移动端浏览器都不支持Font Access API