1. Dynamically set the background image
code that does not display the image
<div class="photoBox" v-show="!ifCircle" :style="{backgroundImage:'url('+ info.avatar}"></div>
The code that can be displayed normally after modification, as for the reason, I don’t know
<div class="photoBox" :style="note"></div>
data () {
return {
note:{
backgroundImage: "url(" + Cookies.get('webuseravatar') + ")",
}
}
- The imported external fonts report an error on IE, because IE9 and above only support eot fonts, so when importing fonts, you need to introduce multiple URLs
@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;
}