背景色を指定したDIVの左上にGIF画像を表示する。
CSS
1 |
div.test{ background:#666 url(../img/~~.gif) no-repeat top left;} |
※画像URLを色指定の後に指定する必要があります。
下記でも大丈夫です。
1 |
div.test{ |
1 |
background-color:#666; |
1 |
background-image:url(../img/~~.gif) ; |
1 |
background-position:left top; |
1 |
background-repeat:no-repeat ; |
1 |
} |