Web Design
Mobile Internet
Brand Design
Innovative
News
Encyclopedias

How to solve the problem that responsive website images cannot be adapted?

Date:2019-08-28 Source: Shangpin China Type: website encyclopedia
Word Size: small   medium   big

With the change of science and technology, the popularity of mobile devices, and more and more mobile devices of different sizes, we see the dawn and urgent demand for the popularity of responsive websites. However, responsive websites have a problem that must be solved: How to fit the pictures in the website to the response. A large picture is too unscientific if the PC side, tablet side and mobile side are all the same size. First, the mobile traffic occupies too much and the download speed is slow. Secondly, the image size will become blurred after large-scale compression.
If the picture exists in the background mode, it is easy to solve this problem. You can use media query to set different pictures for display terminals of different sizes. It is more complicated to solve the problem if it is a picture inserted in the web page.
1、 Apply the srcset attribute
In the srcset, different pictures are displayed according to the media query conditions. They are almost the same as the above, with different expressions. 1x represents the display multiple of the display pixel density.
Normally, I implement it by combining the two. The latest versions of all major browsers basically support it, but the IE series does not support it, which makes us feel very headache.
The more serious problem is that QQ browser uses IE as its core, and WeChat browser does not support it. WeChat has a very high usage rate in China. In addition, the WeChat official website of WeChat public platform is a common demand of customers. The final solution is to use Picturefill, which has a very good effect.
2、 Use picture element
In the wave of pursuing responsive website construction, I hope you don't forget the user experience. Only when all elements of the website can meet the responsive standard, can it be a truly responsive website.
Information source Shangpin China: Responsive Web Site Creation


Please contact our consultant

+86 10-60259772

Please provide your contact number. The project manager of shangpin China will contact you as soon as possible.