Rumah >hujung hadapan web >html tutorial >初学CSS一个问题?_html/css_WEB-ITnose
nbsp;html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
The Internet Society's mission is to achieve a world in which everyone everywhere is connected to an open and universally accessible Internet. Since its inception in 1992, ISOC has been at the forefront of global Internet education by bringing essential information and training to people throughout the world.The Internet Society's mission is to achieve a world in which everyone everywhere is connected to an open and universally accessible Internet. Since its inception in 1992, ISOC has been at the forefront of global Internet education by bringing essential information and training to people throughout the world.
可能是这个背景图片高度太小,repeat-x时看不出来罢了
你这样子让我很惆怅啊。
建议你把那些没用的样式先删除掉。然后一点一点的测试,不要让别的样式影响了。这样的话 你应该能很快的找到错误
LZ在写css的时候首先要注意你css中引用背景图片的路径时候正确,再看看你那个背景图会不会就横着一条件,repeat-x这样不仔细看的话会感觉没有图片的
repeat属性要随着图片尺寸来用的
background-image:url(bg-grad.gif) ;
是不是外部引用和内部的相对路径问题?不显示可能是这个原因。
body {
background-image:url(bg-grad.gif)
/*background-repeat:repeat-x;*/
}
少了一个结束符分号 ;
body 样式代码应该是这样的:
body {
background-image:url(bg-grad.gif);
/*background-repeat:repeat-x;*/
}
果然很纠结
纠结,背景样式不要拆分出来写,聚集到一起,如:
background:url(**.jpg) no-repeat left top;
初学者表示看不懂啊
body {
background:url(bg-grad.gif)
background-repeat:repeat-x;
}
改成这样看看,行不?