February 28, 2012
how to change background img size
Question by SooIn Nam
$(this).css('background','url(img/49057_584817416_4750_q.jpg) no-repeat 10% 40%,url(img/yes_no.png) no-repeat 50% 80%,url(../img/invitation.png)');
I only want to resize img/49057_584817416_4750_q.jpg
Any Thought?
Thank you.
Answer by Starx
Through CSS3, you can do something like this
-webkit-background-size: 80% 80%; /* Saf3-4 */
-moz-background-size: 80% 80%; /* FF3.6 */
background-size: 80% 80%; /* Opera, IE9, Saf5, Chrome, FF4 */