Picture theme, problems caused by rem layout

an activity diagram, cut into 3 pieces, and then use the rem layout,

< div class= "bg1" > < / div > < div class= "bg2" > < / div > < div class= "bg3" > < / div >

.bg1 {

background:url()
height: 3rem;background-size: cover;

}

then a split line appears on the Android,

I don"t know how people generally do this kind of topic

Oct.21,2021

I haven't encountered any similar requirements, so share some ideas on how to deal with them.

  1. out of the separation line, the first doubt is whether the CSS Reset, has been done. If you have done it, you can take a look at the initial value of the relevant elements, and try it if you don't do it.
  2. can also be written into one element with multiple backgrounds
  3. or try SVG, mobile without considering its compatibility

this problem is generally caused by the inability to recognize px units with decimals on some Android computers. Since rem unit conversion is set according to the font size of the html root node, you can change the rem adaptation scheme. Instead of manually writing the viewport tag, you can adjust to use js to control the scale attribute value in the viewport tag, so that pixel units with decimals will not appear during conversion.

refer to Ant Financial Services Group's HD screen adaptation scheme: https://gw.alipayobjects.com/.


do not know what the split line is like, no picture wow, I found it myself, and yours is not the same, according to your code can only see, if your picture is not height:3rem, and then you set the height:3rem, so that the picture does not show a complete, and the following pictures naturally do not dock, it will cause the appearance of a split line. It is recommended to use pictures, you 1 picture cut 3, there is no need to use the background, with the picture directly set a width:100% can, other let him adapt!


set the font-size of the container to 0 try


finally use rem layout, but margin-top:-0.05rem each image to solve the split line problem

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e5a148-4423a.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e5a148-4423a.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?