We all know that using CSS to set a background image for a web page can import network images and local images.
Web image:
element positioning { background-image: url('https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1517753496248&di=c464b97f6d0b3937307066e600043e14&imgtype=0&src=http%3A%2F%2Fwww.86ps.com%2FimgWeb%2Fpsd%2Fhf_zw%2FZW_033.jpg'); }Local image:
Element positioning {background-image: url('../../imgs/petal.jpg'); }Of course goose. . . . In the WeChat development environment, I just made sure that I did not use the second method wrong, but I couldn't load it.
In wxml, the image tag can be used to add local images.
I was quite puzzled, so I tried to enter the network image address in wxss and found that it could be displayed.
To sum up, in the development process of WeChat, it is best to add a background directly on the network picture, that is, the first method.
Some friends have a solution or any experience to ask for advice~~~