开发者

CSS background-image problem

I am writing <div id="my_div"> Hello </div> and when I put

#my_div
{
    background-image:url(../images/material_bot.png)
    background-repeat: no-repeat;
}

then the开发者_如何学Python background does not figure, but when I remove the background-repeat: no-repeat; the I see the background image repeating to right and down.

What is the problem?


You're missing the ; from the end of the first line, so your CSS won't get read correctly. See if adding the semi-colon at the end of the first line fixes it.

#my_div
{
    background-image:url(../images/material_bot.png); /* <-- Semicolon added here */
    background-repeat: no-repeat;
}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜