html-table 相关问题

由于它与HTML有关,因此表格用于以表格方式显示数据。关于HTML表的问题应该通过显示有问题的源代码来询问,或者,如果问题是关于根据需求创建表失败的尝试,提问者需要显示失败的尝试,描述期望和行为如何不同。

如何在顺风的表格行之间添加空格?

我是顺风新手,尝试在表行之间添加空间。 我是顺风新手,正在尝试在表格行之间添加空间。 <table className="table-auto w-full shadow-md mt-5 rounded"> <thead className="bg-base-200 text-left text-gray-700 tracking-wider"> <tr> <th className="p-4 ">Chapter Number</th> <th className="p-4 ">Chapter Name</th> <th className="p-4 ">Added at</th> <th className="p-4 ">Status</th> </tr> </thead> <tbody> {chapters.map((chapter) => ( <tr className="bg-card mt-6 rounded" key={chapter.chapterNumber}> <td className="p-4">{chapter.chapterNumber}</td> <td className="p-4">{chapter.chapterName}</td> <td className="p-4">{chapter.addedAt}</td> <td className="p-4">{!chapter.published && 'Not published'}</td> </tr> ))} </tbody> </table> 这不会增加表格行之间的空间。 所以,我尝试在每一行上使用mt-6。没有效果。我见过类似的问题,并在这里使用了answer,并添加了border-spacing和border-seperate。所以,现在我的表行有这些类。<table className="table-auto w-full shadow-md mt-5 border-spacing-2 border-separate rounded"> 但这会导致所有元素周围增加空间。我不明白为什么表行会这样,并且不采用 margin 和 mt-6。但是如果我用 div 替换行,它会应用边距顶部。 例如: <div> <th className="p-4 ">Chapter Number</th> <th className="p-4 ">Chapter Name</th> <th className="p-4 ">Added at</th> <th className="p-4 ">Status</th> </div> <div className="mt-6 bg-card"> <th className="p-4 ">1</th> <th className="p-4 ">Chapter Name</th> <th className="p-4 ">04/2/2022</th> <th className="p-4 ">Not published</th> </div> <div className="mt-6 bg-card"> <th className="p-4 ">1</th> <th className="p-4 ">Chapter Name</th> <th className="p-4 ">04/2/2022</th> <th className="p-4 ">Not published</th> </div> 首先,您需要使用 table 标签上的 Tailwind border-separate 属性分割边框,然后添加 border-spacing-y-3,其中:y 是轴,number 是行之间的高度。 用于控制表格边框之间间距的实用程序。 Tailwind 文档 <script src="https://cdn.tailwindcss.com"></script> <table class="table-auto w-full shadow-md mt-5 rounded bg-black border-separate border-spacing-y-3"> <thead class="text-left text-gray-500 tracking-wider"> <tr> <th class="p-4">Chapter Number</th> <th class="p-4">Chapter Name</th> <th class="p-4">Added at</th> <th class="p-4">Status</th> </tr> </thead> <tbody class=""> <tr class="bg-card rounded text-gray-200 bg-neutral-900"> <td class="p-4">60001</td> <td class="p-4"></td> <td class="p-4">6/21/2022</td> <td class="p-4">Not published</td> </tr> <tr class="bg-card rounded text-gray-200 bg-neutral-900"> <td class="p-4">60001</td> <td class="p-4"></td> <td class="p-4">6/21/2022</td> <td class="p-4">Not published</td> </tr> </tbody> </table> 使用 border-seperate 和 border-spacing-y-4 仅添加垂直放大倍数。 <script src="https://cdn.tailwindcss.com"></script> <div class="bg-black"> <table class="table-auto w-full shadow-md rounded border-separate border-spacing-y-4"> <thead class="text-white text-left bg-gray-900 tracking-wider"> <tr> <th class="p-4 ">Chapter Number</th> <th class="p-4 ">Chapter Name</th> <th class="p-4 ">Added at</th> <th class="p-4 ">Status</th> </tr> </thead> <tbody class=""> <tr class="bg-stone-800 mt-6 text-white rounded" key={chapter.chapterNumber}> <td class="p-4">{chapter.chapterNumber}</td> <td class="p-4">{chapter.chapterName}</td> <td class="p-4">{chapter.addedAt}</td> <td class="p-4">{!chapter.published && 'Not published'}</td> </tr> <tr class="bg-stone-800 mt-6 text-white rounded" key={chapter.chapterNumber}> <td class="p-4">{chapter.chapterNumber}</td> <td class="p-4">{chapter.chapterName}</td> <td class="p-4">{chapter.addedAt}</td> <td class="p-4">{!chapter.published && 'Not published'}</td> </tr> <tr class="bg-stone-800 mt-6 text-white rounded" key={chapter.chapterNumber}> <td class="p-4">{chapter.chapterNumber}</td> <td class="p-4">{chapter.chapterName}</td> <td class="p-4">{chapter.addedAt}</td> <td class="p-4">{!chapter.published && 'Not published'}</td> </tr> <tr class="bg-stone-800 mt-6 text-white rounded" key={chapter.chapterNumber}> <td class="p-4">{chapter.chapterNumber}</td> <td class="p-4">{chapter.chapterName}</td> <td class="p-4">{chapter.addedAt}</td> <td class="p-4">{!chapter.published && 'Not published'}</td> </tr> </tbody> </table> </div>

回答 2 投票 0

如何使用 R 抓取 google 财经,其中多个页面的页面 url 不会更改?

我想用R网络抓取不同年份的股票财务表。但是,我可以获得去年的财务表,该表显示为默认值。但我也想从

回答 1 投票 0

用php从sql记录生成表

我想生成一份 pdf 格式的公交车乘客列表。 我的问题是,在右侧的每两个单元格中,每行的第一个单元格中都有同一个人。 我想要

回答 1 投票 0

如何使用Markdown在表格中插入图片

如何使用Markdown在表格中插入图片 普通的 html 语法工作正常,但 markdown 语法返回为表数据, 请提出任何答案 普通 HTML # 表格内的图像 <...

回答 3 投票 0

html 表格存在跨度问题

我正在尝试创建一个包含 colspan 和 rowspan 的表。 桌子 { 字体系列:arial、sans-serif; border-collapse: 折叠...</desc> <question vote="0"> <p>我正在尝试创建一个包含 colspan 和 rowspan 的表。</p> <p></p><div data-babel="false" data-lang="js" data-hide="false" data-console="true"> <div> <pre><code>&lt;!DOCTYPE html&gt; &lt;html&gt; &lt;head&gt; &lt;style&gt; table { font-family: arial, sans-serif; border-collapse: collapse; width: 100%; } td, th { border: 1px solid black; text-align: left; padding: 8px; } .top { background-color: yellow; } .left { background-color: blue; } .right { background-color: green; } &lt;/style&gt; &lt;/head&gt; &lt;body&gt; &lt;h2&gt;HTML Table&lt;/h2&gt; &lt;table class=&#34;&#34;&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td rowspan=&#34;2&#34;&gt;&lt;/td&gt; &lt;td colspan=&#34;5&#34;&gt;&lt;/td&gt; &lt;td colspan=&#34;2&#34; rowspan=&#34;2&#34;&gt;&lt;/td&gt; &lt;td colspan=&#34;3&#34; rowspan=&#34;2&#34;&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td class=&#34;top&#34; colspan=&#34;5&#34;&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td rowspan=&#34;5&#34;&gt;&lt;/td&gt; &lt;td class=&#34;left&#34; colspan=&#34;1&#34;&gt;&lt;/td&gt; &lt;td class=&#34;left&#34; colspan=&#34;1&#34;&gt;&lt;/td&gt; &lt;td class=&#34;right&#34; colspan=&#34;8&#34;&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td class=&#34;left&#34; colspan=&#34;1&#34;&gt;&lt;/td&gt; &lt;td class=&#34;left&#34; colspan=&#34;1&#34;&gt;&lt;/td&gt; &lt;td class=&#34;right&#34; colspan=&#34;8&#34;&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td class=&#34;left&#34; colspan=&#34;1&#34;&gt;&lt;/td&gt; &lt;td class=&#34;left&#34; colspan=&#34;1&#34;&gt;&lt;/td&gt; &lt;td class=&#34;right&#34; colspan=&#34;8&#34;&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td class=&#34;left&#34; colspan=&#34;1&#34;&gt;&lt;/td&gt; &lt;td class=&#34;left&#34; colspan=&#34;1&#34;&gt;&lt;/td&gt; &lt;td class=&#34;right&#34; colspan=&#34;8&#34;&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td class=&#34;left&#34; colspan=&#34;2&#34;&gt;&lt;/td&gt; &lt;td class=&#34;left&#34; &gt;&lt;/td&gt; &lt;td class=&#34;right&#34; colspan=&#34;7&#34;&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td rowspan=&#34;1&#34;&gt;&lt;/td&gt; &lt;td colspan=&#34;10&#34;&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td rowspan=&#34;1&#34;&gt;&lt;/td&gt; &lt;td colspan=&#34;10&#34;&gt;&lt;/td&gt; &lt;/tr&gt; &lt;/tbody&gt; &lt;/table&gt; &lt;/body&gt; &lt;/html&gt;</code></pre> </div> </div> <p></p> <p>我想让最后的蓝色/绿色与前 4 行相同。但是当我将其更改为使用相同的 colspan 值时,结果如下。</p> <p></p><div data-babel="false" data-lang="js" data-hide="false" data-console="true"> <div> <pre><code>&lt;!DOCTYPE html&gt; &lt;html&gt; &lt;head&gt; &lt;style&gt; table { font-family: arial, sans-serif; border-collapse: collapse; width: 100%; } td, th { border: 1px solid black; text-align: left; padding: 8px; } .top { background-color: yellow; } .left { background-color: blue; } .right { background-color: green; } &lt;/style&gt; &lt;/head&gt; &lt;body&gt; &lt;h2&gt;HTML Table&lt;/h2&gt; &lt;table class=&#34;&#34;&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td rowspan=&#34;2&#34;&gt;&lt;/td&gt; &lt;td colspan=&#34;5&#34;&gt;&lt;/td&gt; &lt;td colspan=&#34;2&#34; rowspan=&#34;2&#34;&gt;&lt;/td&gt; &lt;td colspan=&#34;3&#34; rowspan=&#34;2&#34;&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td class=&#34;top&#34; colspan=&#34;5&#34;&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td rowspan=&#34;5&#34;&gt;&lt;/td&gt; &lt;td class=&#34;left&#34; colspan=&#34;1&#34;&gt;&lt;/td&gt; &lt;td class=&#34;left&#34; colspan=&#34;1&#34;&gt;&lt;/td&gt; &lt;td class=&#34;right&#34; colspan=&#34;8&#34;&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td class=&#34;left&#34; colspan=&#34;1&#34;&gt;&lt;/td&gt; &lt;td class=&#34;left&#34; colspan=&#34;1&#34;&gt;&lt;/td&gt; &lt;td class=&#34;right&#34; colspan=&#34;8&#34;&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td class=&#34;left&#34; colspan=&#34;1&#34;&gt;&lt;/td&gt; &lt;td class=&#34;left&#34; colspan=&#34;1&#34;&gt;&lt;/td&gt; &lt;td class=&#34;right&#34; colspan=&#34;8&#34;&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td class=&#34;left&#34; colspan=&#34;1&#34;&gt;&lt;/td&gt; &lt;td class=&#34;left&#34; colspan=&#34;1&#34;&gt;&lt;/td&gt; &lt;td class=&#34;right&#34; colspan=&#34;8&#34;&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td class=&#34;left&#34; colspan=&#34;1&#34;&gt;&lt;/td&gt; &lt;td class=&#34;left&#34; colspan=&#34;1&#34;&gt;&lt;/td&gt; &lt;td class=&#34;right&#34; colspan=&#34;8&#34;&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td rowspan=&#34;1&#34;&gt;&lt;/td&gt; &lt;td colspan=&#34;10&#34;&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td rowspan=&#34;1&#34;&gt;&lt;/td&gt; &lt;td colspan=&#34;10&#34;&gt;&lt;/td&gt; &lt;/tr&gt; &lt;/tbody&gt; &lt;/table&gt; &lt;/body&gt; &lt;/html&gt;</code></pre> </div> </div> <p></p> <p>它重新排列表格的宽度。我想根据 colspan 和 rowspan 保持初始宽度。</p> <p>我猜问题在于添加的 colspan/rowspan 值,但我不知道在哪里。</p> </question> <answer tick="false" vote="0"> <p>添加表格布局:固定;如下所示的表格CSS。</p> <pre><code>table { font-family: arial, sans-serif; border-collapse: collapse; width: 100%; table-layout: fixed; } </code></pre> <p>此外,您的第二个代码是正确的。您的表列没有数据。因此,该列的内容较少或没有内容,这意味着宽度主要受 colspan 的影响。如果单元格的 colspan = 5 并且没有太多内容,那么它可能看起来与多个单独的列具有相同的宽度。</p> <p>当我最初设置如下所示的 11 列时,您可以获得更正后的表格。</p> <p></p><div data-babel="false" data-lang="js" data-hide="false" data-console="true"> <div> <pre><code>&lt;!DOCTYPE html&gt; &lt;html&gt; &lt;head&gt; &lt;style&gt; table { font-family: arial, sans-serif; border-collapse: collapse; width: 100%; } td, th { border: 1px solid black; text-align: left; padding: 8px; } .top { background-color: yellow; } .left { background-color: blue; } .right { background-color: green; } &lt;/style&gt; &lt;/head&gt; &lt;body&gt; &lt;h2&gt;HTML Table&lt;/h2&gt; &lt;table class=&#34;&#34;&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td colspan=&#34;1&#34;&gt;&lt;/td&gt; &lt;td colspan=&#34;1&#34;&gt;&lt;/td&gt; &lt;td colspan=&#34;1&#34;&gt;&lt;/td&gt; &lt;td colspan=&#34;1&#34;&gt;&lt;/td&gt; &lt;td colspan=&#34;1&#34;&gt;&lt;/td&gt; &lt;td colspan=&#34;1&#34;&gt;&lt;/td&gt; &lt;td colspan=&#34;1&#34;&gt;&lt;/td&gt; &lt;td colspan=&#34;1&#34;&gt;&lt;/td&gt; &lt;td colspan=&#34;1&#34;&gt;&lt;/td&gt; &lt;td colspan=&#34;1&#34;&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td rowspan=&#34;2&#34;&gt;&lt;/td&gt; &lt;td colspan=&#34;5&#34;&gt;&lt;/td&gt; &lt;td colspan=&#34;2&#34; rowspan=&#34;2&#34;&gt;&lt;/td&gt; &lt;td colspan=&#34;3&#34; rowspan=&#34;2&#34;&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td class=&#34;top&#34; colspan=&#34;5&#34;&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td rowspan=&#34;5&#34;&gt;&lt;/td&gt; &lt;td class=&#34;left&#34; colspan=&#34;1&#34;&gt;&lt;/td&gt; &lt;td class=&#34;left&#34; colspan=&#34;1&#34;&gt;&lt;/td&gt; &lt;td class=&#34;right&#34; colspan=&#34;8&#34;&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td class=&#34;left&#34; colspan=&#34;1&#34;&gt;&lt;/td&gt; &lt;td class=&#34;left&#34; colspan=&#34;1&#34;&gt;&lt;/td&gt; &lt;td class=&#34;right&#34; colspan=&#34;8&#34;&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td class=&#34;left&#34; colspan=&#34;1&#34;&gt;&lt;/td&gt; &lt;td class=&#34;left&#34; colspan=&#34;1&#34;&gt;&lt;/td&gt; &lt;td class=&#34;right&#34; colspan=&#34;8&#34;&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td class=&#34;left&#34; colspan=&#34;1&#34;&gt;&lt;/td&gt; &lt;td class=&#34;left&#34; colspan=&#34;1&#34;&gt;&lt;/td&gt; &lt;td class=&#34;right&#34; colspan=&#34;8&#34;&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td class=&#34;left&#34; colspan=&#34;1&#34;&gt;&lt;/td&gt; &lt;td class=&#34;left&#34; colspan=&#34;1&#34;&gt;&lt;/td&gt; &lt;td class=&#34;right&#34; colspan=&#34;8&#34;&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td rowspan=&#34;1&#34;&gt;&lt;/td&gt; &lt;td colspan=&#34;10&#34;&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td rowspan=&#34;1&#34;&gt;&lt;/td&gt; &lt;td colspan=&#34;10&#34;&gt;&lt;/td&gt; &lt;/tr&gt; &lt;/tbody&gt; &lt;/table&gt; &lt;/body&gt; &lt;/html&gt;</code></pre> </div> </div> <p></p> <p>但是当我们添加内容时,它会自动更改布局。因此,将CSS添加到表格中,并修复表格在添加内容时不改变布局的问题。</p> </answer> </body></html>

回答 0 投票 0

如何使用html表格打印乘法表(代码是Javascript)?

这是我的代码,它工作得很好。我只是想通过使用 Html 表格来打印表格,并且还想在其上应用 bootstrap 来添加边框,乘法表以...

回答 3 投票 0

单击鼠标隐藏表格列

我有一个表格,我想在双击某列时隐藏某列。 隐藏列的代码实际上遍布 Stack Overflow。我所需要的只是关于如何/在哪里添加 ondblclick e 的提示...

回答 4 投票 0

Tanstack 表 v8 未调整列大小

有这个反应组件: 从 '../../data.json' 导入 rawd; 从“@tanstack/react-table”导入{flexRender,getCoreRowModel,useReactTable} 从“react&qu...

回答 1 投票 0

使用 border-collapse:separate 时如何删除第一个 html 表格行上方的空间?

我正在使用 border-collapse: 单独的属性来添加表格行之间的间距,我想删除第一个表格行上方的间距。最好的方法是什么? 这就是我的

回答 1 投票 0

如何使用BeautifulSoup从HTML中抓取表格数据?

我一直在尝试从这个网站上抓取表格https://www.alphaquery.com/stock/aapl/earnings-history 但我无论如何也无法实现它。我什至找不到桌子。 导入请求 来自 BS4 我...

回答 1 投票 0

如何从 HTML 中抓取表格数据?

我一直在尝试从这个网站上抓取表格https://www.alphaquery.com/stock/aapl/earnings-history 但我无论如何也无法实现它。我什至找不到桌子。 导入请求 来自 BS4 我...

回答 1 投票 0

如何在CSS中左右扩展HTML表格?

给定一个简单的表格,它是一篇文章的子项。 该表格的宽度为 100%,因此适合其父级文章。 我希望桌子稍微向外扩展,左右两侧对称......

回答 1 投票 0

我试图在单击时更改我的tbody 中表格行的背景颜色

我是一名一年级学生,正在创建一个函数,以便在单击表格行或 td 单元格时突出显示并更改“populateStaffTable”tbody 表格行中的背景颜色。尽管

回答 0 投票 0

如何获取输入然后添加到我们的html表格中

大家好,我想编写一个代码来获取输入,然后将该信息添加到输入下的表格中 日, TD { 边框:1px 纯黑; 背景颜色:白色; 边框半径:10px; } th {

回答 1 投票 0

根据Javascript中的值显示/隐藏列

我对 javascript 还很缺乏经验,不过我想尝试一下,并且很高兴得到一些支持。我有以下场景: 我有一张桌子,有几行......

回答 6 投票 0

嵌套 CSS 网格放置在 HTML 表格元素内时会水平溢出

我在动态生成的发票中有一个CSS网格。我提前知道行数和列数。我还使用模板行和模板列并定义每列的列宽

回答 1 投票 0

使用内联 CSS 将表格转换为 HTML [已关闭]

如何使用内联CSS将该表格转换为HTML? 该表将在电子邮件程序中使用,仅内联 CSS。 这是用于创建表的原始代码。 如何使用内联CSS将该表格转换为HTML? 该表格将在电子邮件程序中使用,仅内联 CSS。这是用于创建表的原始代码。 <center> <table style="width:100%; color: #000000; font-family: inter; display: grid; grid-template-columns: 100% 100%; grid-template-rows: auto; align-items: stretch; padding: 50px;"> <div> <tr> <th>M&M</th> <th>Tech M</th> </tr> <tr> <td style="color: #19C353; text-align: center;">+4.5%</td> <td style="color: #E82619; text-align: center;">-1.9%</td> </tr> </div> <tr> <th>Power Grid</th> <th>Bharat Petroleum</th> </tr> <tr> <td style="color: #19C353; text-align: center;">+2.7%</td> <td style="color: #E82619; text-align: center;">-1.8%</td> </tr> <tr> <th>Shriram Finance</th> <th>JSW Steel</th> </tr> <tr> <td style="color: #19C353; text-align: center;">+2.3%</td> <td style="color: #E82619; text-align: center;">-1.5%</td> </tr> <tr> <th>IndusInd Bank</th> <th>HCL Tech</th> </tr> <tr> <td style="color: #19C353; text-align: center;">+1.9%</td> <td style="color: #E82619; text-align: center;">-1.5%</td> </tr> <tr> <th>Hero Moto</th> <th>Dr Reddy&apos;s</th> </tr> <tr> <td style="color: #19C353; text-align: center;">+1.9%</td> <td style="color: #E82619; text-align: center;">-1.4%</td> </tr> </table> </center> 您可以通过删除每个 div 中的第二个表格行来稍微调整它,并仅使用表格标题和类似段落标记的内容来设置表格标题的样式,而段落标记位于它们之间。 <div> <tr> <th style="backgroud-color: #e3e9e5; text-align: center; padding: 0.5em; border-radius: 10px;">M&M <p style="color: #19C353; text-align: center;">+4.5%</p> </th> <th style="backgroud-color: #e3e9e5; text-align: center; padding: 0.5em; border-radius: 10px;">Tech M <p style="color: #E82619; text-align: center;">-1.9%</p> </th> </tr> </div> grid-template-rows: auto; align-items: stretch; padding: 50px;"> <div style="border-radius: 10px; padding: 0.5em; "> <tr> <th style="border-radius: 10px; padding: 0.5em; background-color: #e3e9e5; text-align: center;">M&M <p style="color: #19C353; text-align: center;">+4.5%</p> </th> <th style="border-radius: 10px; padding: 0.5em; background-color: #e3e9e5; text-align: center;">Tech M <p style="color: #E82619; text-align: center;">-1.9%</p> </th> </tr> </div> <div style="border-radius: 10px; padding: 0.5em; "> <tr> <th style="border-radius: 10px; padding: 0.5em; background-color: #e3e9e5; text-align: center;">M&M <p style="color: #19C353; text-align: center;">+4.5%</p> </th> <th style="border-radius: 10px; padding: 0.5em; background-color: #e3e9e5; text-align: center;">Tech M <p style="color: #E82619; text-align: center;">-1.9%</p> </th> </tr> </div> <div style="border-radius: 10px; padding: 0.5em; "> <tr> <th style="border-radius: 10px; padding: 0.5em; background-color: #e3e9e5; text-align: center;">M&M <p style="color: #19C353; text-align: center;">+4.5%</p> </th> <th style="border-radius: 10px; padding: 0.5em; background-color: #e3e9e5; text-align: center;">Tech M <p style="color: #E82619; text-align: center;">-1.9%</p> </th> </tr> </div> <div style="border-radius: 10px; padding: 0.5em; "> <tr> <th style="border-radius: 10px; padding: 0.5em; background-color: #e3e9e5; text-align: center;">M&M <p style="color: #19C353; text-align: center;">+4.5%</p> </th> <th style="border-radius: 10px; padding: 0.5em; background-color: #e3e9e5; text-align: center;">Tech M <p style="color: #E82619; text-align: center;">-1.9%</p> </th> </tr> </div> </table> </center> </body> </html>

回答 2 投票 0

有人可以帮忙将此表转换为 HTML CSS,就像本文所附照片中的那样,使用内联 CSS 吗?

有人可以帮忙将此表转换为 HTML CSS,就像本文所附照片中的那样,使用内联 CSS 吗? 该表格将在电子邮件程序中使用,请仅使用内联 CSS。 这是RAW代码

回答 1 投票 0

有没有办法在 primeNg 的 p-editor 元素的工具栏中选择创建表格?

我在我的 Angular 项目 (14.2.0) 中使用 primeNg 库。 其中一个组件使用 p-editor 来创建模板,它具有我需要的选项,除了“创建表”之外。 &...

回答 1 投票 0

如何使嵌套html表格中的特定列水平滚动?

当有3个或更多货币栏时,我想让它水平滚动,如下所示: 目前,我的表如下所示: 前 6 列是固定的,将占据父表的 80%

回答 1 投票 0

© www.soinside.com 2019 - 2024. All rights reserved.