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;
}
精彩评论