CSS background with ) in its name?
I want to display a div with a background image called something like this:"image_(1)_125x192.jpg". It doesn't display, presumably due to the ")". Is there a way around this without renaming the image?
#div {
开发者_运维问答 background-image: url(image_(1)_125x192.jpg);
height: 192px;
width: 125px;
}
Thanks!
Use quotes
background-image: url("image_(1)_125x192.jpg");
w3 reference: http://www.w3.org/TR/CSS2/colors.html#propdef-background-image
#div {
background-image: url('image_(1)_125x192.jpg');
height: 192px;
width: 125px;
}
note the quote
精彩评论