开发者

CSS background image

开发者 https://www.devze.com 2022-12-28 04:31 出处:网络
I have .green { background-image:(\'http://i42.tinypic.com/xzup2.jpg\') background-repeat: no-repeat开发者_如何学JAVA;

I have

.green {
background-image:('http://i42.tinypic.com/xzup2.jpg')
background-repeat: no-repeat开发者_如何学JAVA;
height:430px;
width:100%;
}
.yellow {
background-image: url('/images/yellowlight.png');
background-repeat: no-repeat;
height:430px;
width:100%;
}

in my css.

.yellow works fine, but .green. does not work. What's wrong?


You're missing the "url" bit.

background-image:('http://i42.tinypic.com/xzup2.jpg')

should be:

background-image: url('http://i42.tinypic.com/xzup2.jpg');

0

精彩评论

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