Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/32.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Html 设置带有图像和文本的表格的背景_Html_Css - Fatal编程技术网

Html 设置带有图像和文本的表格的背景

Html 设置带有图像和文本的表格的背景,html,css,Html,Css,我正在尝试用html和css创建一个包含文本和图像的表。我想给整个桌子涂上颜色,并在背景色上显示图像 HTML <table> <tr> <td class="timg"> <img src="s.jpg" /> </td> <td> <p><h3>This is some text </h3> all the bbbbbbbbbbbbbbbbb</p> </td>

我正在尝试用html和css创建一个包含文本和图像的表。我想给整个桌子涂上颜色,并在背景色上显示图像

HTML

<table>
<tr>
<td class="timg">
<img src="s.jpg" />
</td>
<td>
<p><h3>This is some text </h3> all the bbbbbbbbbbbbbbbbb</p>
</td>
</tr>
<tr>
<td class="timg"><img src="p.jpg" /> </td>
<td> <p> This is some text</p> </td>
</tr>
</table>

这是一些文本所有的bbbbbbbbbbbbbbbbbbbb

这是一些文本

css文件.timgimg{高度:100px;宽度:150px;}.timgimg{高度:100px;宽度:150px;}你的意思是这样吗?实际上我需要这样的东西好的,像这样:?
 .timg{

  height: 100px;
  width: 150px;

  }

.timg img {

  height: 100px;
  width:150px;

  }