我是这样定义的
.pic-top {
width:950px;height:244px;
background-attachment: fixed;
background-image: url(images/banner_r4_c2.jpg);
background-repeat: no-repeat;
background-position: center;
<div class="pic-top"></div>
请问有问题么,怎么背景看不到,请不吝赐教,谢谢~~
我是这样定义的
.pic-top {
width:950px;height:244px;
background-attachment: fixed;
background-image: url(images/banner_r4_c2.jpg);
background-repeat: no-repeat;
background-position: center;
<div class="pic-top"></div>
请问有问题么,怎么背景看不到,请不吝赐教,谢谢~~
.pic-top { width:950px;height:244px; background-image:url(Images/landscapes.jpg); background-repeat: no-repeat; background-position:center; }
我这么写的就出来了,,如果在加上background-attachment: fixed; 固定背景,它就消失了,,我也新手 呵呵,,
路径问题最可能,如果你用的是link导入css,也会发生这个错误,因为,那个时候相对路径就是依照css文件所在文件路径取了
<div class="pic-top"></div>
你把这个放到<body></body>中间
你最好换一下图片的地址看看,图片的地址对不对,如果看不出来效果的话,你可以先设置一下网站的背景颜色,如果可以显示,你就得看看是不是图片地址不正确,
或者还有一个可能就是你的图片格式不正确,要在ps里面打开看看,是不是正常的格式,如果这些都检查了。我想按应该就可以显示出来了