vue项目在ie浏览器上要注意的问题

mac2025-04-11  12

1. 动态设置背景图片 不显示图片的代码

<div class="photoBox" v-show="!ifCircle" :style="{backgroundImage:'url('+ info.avatar}"></div>

修改之后可以正常显示的代码,至于原因我也不知道

<div class="photoBox" :style="note"></div> data () { return { note:{ backgroundImage: "url(" + Cookies.get('webuseravatar') + ")", } } 引入的外部字体在ie上报错,因为ie9以上只支持eot的字体,所以引入字体的时候要引入多个url @font-face { font-family: 'DIN-Bold'; src:url('DIN-Condensed-Bold.ttf'); src:url('DIN-Condensed-Bold.eot?#iefix') format('DIN-Condensed-Bold.woff') format('woff'), url('DIN-Condensed-Bold.ttf') format('truetype'), url('DIN-Condensed-Bold.svg#webfontOTINA1xY') format('svg'); font-weight: normal; font-style: normal; }
最新回复(0)