/* begin overall style */
body
{
margin: 0;
padding: 0;
background: purple;
color: #6666ff;
font: normal 10pt Arial,Helvetica,sans-serif;
background:white url(bg.gif) repeat-x left top;
}#header
{
margin: 0;
padding: 0;
height: 100px;
}#logo
{
padding: 5px 0 5px 10px;
font-size: 200%;
}#mainmenu
{
position: absolute;
top: 59px;
}#mainmenu ul
{
padding: 0;
margin: 0;
padding: 0.4em 0 0.3em 0;
}#mainmenu ul li
{
display: inline;
}#mainmenu ul li a
{
padding: 0.4em 0.4em;
color: white;
text-decoration: none;
font-weight: bold;
}#mainmenu ul li a:hover, #mainmenu ul li a.active
{
background: #E6F2FF;
color: #6399cd;
}#content
{
    position: relative;
    width: 95%;
    margin: 0 auto;
    padding: 0px;
}#footer
{
padding: 15px;
margin: 20px 0 0 0;
font-size: 0.8em;
text-align: center;
border-top: 1px solid #EEE;
}
/* end of overall style *//* begin data grid style */
table.dataGrid
{
background: white;
border-collapse: collapse;
width: 100%;
}table.dataGrid th, table.dataGrid td
{
font-size: 0.9em;
border: 1px #4F81BD solid;
padding: 0.3em;
}table.dataGrid th
{
background: #E0FFFF;
text-align: center;
}table.dataGrid th.label
{
width: 150px;
}table.dataGrid tr.odd
{
background: #E0FFFF;
}
/* end of data grid style */.actionBar
{
margin: 10px;
}div.item
{
margin: 10px 0 0 0;
border: 1px solid silver;
padding: 5px;
}
中在哪写出入图片背景的地址,格式是怎么样的?谢谢各位大侠帮下忙!

解决方案 »

  1.   

    在下面加入
    body{
        background-image:url(images/bg.jpg);
    }
      

  2.   

    直接加在程序的最后一行还是加在body{}的最后一行?
      

  3.   

    建议把
    background:white url(bg.gif) repeat-x left top; 
    这行拆一下background-color:#fff;
    background:url(bg.gif) repeat-x top left;
      

  4.   

    background:white url(bg.gif); 如果你的图片比较小 就不要这些代码 repeat-x left top
      

  5.   

    仔细看一下背景图片的URL是否正确,CSS文件的位置相对图片的路径对不对? 肯定是这里有错误,如你的CSS文件在一个叫"CSS"的文件夹内,而背景图片在一个叫"images"的文件夹内,那CSS中引用背景图片时,就应该是:background:white url(../images/bg.gif) repeat-x left top;
      

  6.   

    body{ 
        background:url(images/bg.jpg) #000000 top ; 
    }