开发者

CSS background with ) in its name?

开发者 https://www.devze.com 2022-12-18 12:46 出处:网络
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

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

精彩评论

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