开发者

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

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜