Home  >  Article  >  Web Front-end  >  How to solve the problem of white bars between pictures in html pages with only picture splicing

How to solve the problem of white bars between pictures in html pages with only picture splicing

高洛峰
高洛峰Original
2016-11-21 10:47:212476browse

Sometimes there will be a page like this. The entire page is composed of several cut pictures. However, when these pictures are spliced ​​together using code, there will always be a problem with white bars between the pictures, as shown below:

How to solve the problem of white bars between pictures in html pages with only picture splicing

Solution Method: Just add line-height: 0; to the parent container of the image, because tags such as body/div will have line-height attributes by default, even images will be affected by this default style

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