I have a div with the background-size: 25%... I have some JavaScript that does a dropdown box. Without the div, the transition is smooth, however with the div present, the dropdown box is very choppy. Its only choppy when the background-size is set to 25%... Is there a way to fix it so it isn't laggy?
您可以使用图像编辑器预先缩小图像并摆脱background-size
规则。
When you use CSS (or HTML attributes) to resize an image, the full-sized image is first downloaded, and then resized in memory before it is displayed. If you serve a smaller image instead (by resizing the image on the server), it'll download quicker.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.