views:

27

answers:

3

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?

A: 

You can use an image editor to shrink the image in advance and get rid of the background-size rule.

SLaks
A: 

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.

Daniel Vandersluis
A: 

@Daniel No I cannot, I need it to be dynamic.

@SLaks Yeah... I was thinking about doing that. However that requires ANOTHER HTTP header...

Camoy