Set size on background image with CSS?

后端 未结 18 1677
野性不改
野性不改 2020-11-22 12:38

Is it possible to set the size of the background image with CSS?

I want to do something like:

background: url(\'bg.gif\') top repeat-y;
background-si         


        
18条回答
  •  难免孤独
    2020-11-22 13:14

    If your users use only Opera 9.5+, Safari 3+, Internet Explorer 9+ and Firefox 3.6+ then the answer is yes. Otherwise, no.

    The background-size property is part of CSS 3, but it won't work on most browsers.

    For your purposes just make the actual image larger.

提交回复
热议问题