Home  >  Article  >  WeChat Applet  >  Solution to image borders in small program development

Solution to image borders in small program development

巴扎黑
巴扎黑Original
2017-09-09 15:05:143476browse

When we first build the web page, we don't know what specific images need to be placed in the website, so we often place an empty img tag, but in this case, the image tag has no src value, so A black border will be displayed on the website.
The code and effect are displayed as follows:

Picture: 1.png

Solution to image borders in small program development


##Picture: 2.png

Solution to image borders in small program development
Here we will solve the black border and propose two Solution:
1. Set the opacity of the picture: 0;


Picture: 3.png

Solution to image borders in small program development
2. Place another block tag instead of the img tag. Because img here only serves as a placeholder, you can use other tags to replace it. When using it, change it back to the img tag.

The above is the detailed content of Solution to image borders in small program development. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn