javascript - 如何将图像添加到表格单元格

标签 javascript reactjs

我需要将 pdf 图像添加到 tabelCell 文本的末尾

这是我的表格,我希望在文本结束后以某种方式连接图像

<TableCell component="th" scope="row" className = {classes.tableCell} >
  PDF example download <div img src="static/image/file-pdf.png"/>
</TableCell>

I would expext that this image would be placed next to the text but this isnt the case.

最佳答案

 <TableCell component="th" scope="row" className = {classes.tableCell} >
   PDF example download 
  <div>
    <img src="static/image/file-pdf.png"/>
   </div>
 </TableCell>

关于javascript - 如何将图像添加到表格单元格,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55338717/

相关文章:

Reactjs Module CSS 多类选择器

javascript - 将本地模块导入为带有子组件的组件

javascript - 如何根据奇数或偶数索引删除数组中的元素?

javascript - ES6 对象.assign() : why do undefined properties override defined properties?

php - Jquery form.submit 在 IE9 中不发布任何内容

javascript - AngularJS:如何使用 ng-repeat 添加类

node.js - 如何从 Express API 获取数据并将其显示到 React 应用程序?

javascript - 使用 Webpack 别名会导致在 WebStorm 中导入别名时出现 ESLint 错误

javascript - 在 JavaScript 中的 IF 中对多个或语句进行分组

javascript - 使用 Nodejs 创建/更新 JavaScript 文件/代码