2014-08-29 107 views
-1

我使用HTML和CSS制作一个项目中,IM创建Windows 8使用样式表,我要去添加不同的图像作为表格单元格背景 文件 垃圾 但它不显示任何图像如何添加图片作为表格单元格背景

+0

你可以在http://jsbin.com/上分享一些代码吗? – 2014-08-29 03:33:24

+0

是的,显示你的代码。 – Developer 2014-08-29 04:07:24

+0

你想在表格行和列中设置图像 – Developer 2014-08-29 04:08:37

回答

0

试试这个:在表中的每一个细胞

<table> 
<tr> 
<td background="http://wallpaper-download.net/wallpapers/random-wallpapers-green-lime-background-wallpaper-32549.jpg" height="600px" width="700px" align="center">rvrtv</td> 
</tr> 
</table> 
+0

这是不正确的。您不能将CSS背景属性添加为标签属性。它必须包装在style属性中! – 2014-08-29 08:23:35

-1

显示图像

<html> 
<style> 
.first 
{ 
    background : imagepath ; 
    } 
</style> 
    <body> 
    <table> 
    <tr> 
     <td class="first">some value</td> 
    </tr> 
</table>