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 */

Author: Nabin Nepal (Starx)

Hello, I am Nabin Nepal and you can call me Starx. This is my blog where write about my life and my involvements. I am a Software Developer, A Cyclist and a Realist. I hope you will find my blog interesting. Follow me on Google+

...

Please fill the form - I will response as fast as I can!