Set CSS background-size to be 'original' or '2x original', etc? -



Set CSS background-size to be 'original' or '2x original', etc? -

im making image sprite sheet. icons need half size on mobile background-size needs half of original image.

is way set background-size property in px?

in instances images need 3/4 or there original size beingness able specify background size ratio of original image quicker , create code easier read.

using background-size mobile alternative it's more supported.

you set background in percentage, if that's easier read you:

(1/2)

background-size: 50%;

(3/4)

@media screen , (min-width: 480px){ background-size: 75%; }

css

Comments

Popular posts from this blog

php - Android app custom user registration and login with cookie using facebook sdk -

django - Access session in user model .save() -

php - .htaccess Multiple Rewrite Rules / Prioritizing -