且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何在表格行中放置图片?

更新时间:2022-06-22 22:03:10

如何在表行中插入图像
How to insert an image in a Table Row
<table><tbody><tr><td><img src="YourImageSource" />Your Text Here</td></tr></tbody></table>


^ ]


Create Html Title Bar[^]


嘿朋友,
如果您要在表格行中插入图片,则只需为图片编写CSS类,您可以通过两种方式做到这一点

1.使用class
将图像应用于表行
Hey Friend ,
if u want to insert an image in to table row then you just need to write css class for image you can do it two ways

1. applying image to the table row using class
<style type="text/css">
        .ClassName
        {
            background-image:YoourImagePath;
        }
    </style>


<table>
    <tr class="className">
        <td></td>
    </tr>
</table>




2使用class
将图像应用于表格列



OR
2 applying image to the table column using class

<style type="text/css">
    .ClassName
    {
        background-image:YoourImagePath;
    }
</style>





<table>
    <tr >
        <td class="className"></td>
    </tr>
</table>