前端爬坑之路-小程序篇-背景图片
2017-07-21 本文已影响58人
大雄爱静香
小程序不支持background-image 加上直接路径的形式
你只能使用经过64位转码的格式。
请使用一下的形式:
background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAMAAAAp4XiDAAAAYFBMVEUAAABT1OVT1OVT1OVT1OVT1OVT1OVT1OVT1OVT1OVT1OVT1OVT1OVT1OVT1OVT1OVT1OVT1OVT1OVT1OVT1OVT1OVT1OVT1OVT1OVT1OVT1OVT1OVT1OVT1OVT1OVT1OUvgiB1AAAAH3RSTlMA4/YE+h8Q7+o1GNzQwK50VUg9MComCddpYMi3opeBV/+7egAAAKpJREFUSMft1FsOgjAQhWEulgJV0dJyE+z+d6lTWYA/iTEknPcvzbSdkxz5S5oFixCWHIlneGfO2SGSKzLDZvPoiBlPYi7I3D6m4GZC5p6JOW8xNTE2mh6ZSosxipsUmbaMxhPj0mgcMT6askXzBIkBou5FZPZ7oYwIXQGxToJnd/iGPX5H9csfZjX9x3bdFr6TVEwF7hcuOtJ7uCsb3sjJAIVknPPkyP7yAjltFhigE8bFAAAAAElFTkSuQmCC) no-repeat right center;
转码工具推荐使用菜鸟工具 本人用着不错