Azure Wiki中的着色表行

问题描述 投票:0回答:1

如何在Azure Devops Wiki中的表格中创建彩色行?我想创建类似下面的内容

.table-striped th {
  height: 45px;
  background-color: #bfff00 !important;
  color: #191919;
}

.table-striped tr:nth-child(even) td {
  background-color: #4287f5;
}
	<div>
	  <table class="table-striped">
		<tr>
		  <th>Header 1</th>
		  <th>Header 2</th>
		  <th>Header 3</th>
		</tr>
		<tr>
		  <td>Cell 1</td>
		  <td>Cell 2</td>
		  <td>Cell 3</td>
		</tr>
		<tr>
		  <td>Cell 1</td>
		  <td>Cell 2</td>
		  <td>Cell 3</td>
		</tr>
	  </table>
	</div>

在Azure Wiki中创建表的主要方法是Markdown表,从我发现的是Markdown does not support color。也许有什么把戏?

[从Azure Wiki Syntax Help我发现还支持HTML标记和YAML表,但是我能够实现的一切都是通过markdown内的span标记进行着色:

<span style="background-color: red">57065</span>|<span style="background-color: red">4560</span>|<span style="background-color: red">I AM TABLE ROW</span>

而且看起来很丑。

enter image description here

有没有办法实现完整的着色?

azure html-table azure-devops yaml markdown
1个回答
0
投票

尝试使用内联样式。这里我举个例子:

<table style="border:ridge 4px red">
  <tr style="background-color:blue;color:white;" id="ROW1">
    <td style="border:ridge 4px red" >Cell 1.1</td>
    <td style="border:ridge 4px red">Cell 1.2</td>
    <td style="border:ridge 4px red">Cell 1.3</td>
  </tr>
  <tr style="background-color:yellow;color:green;" id="ROW2">
    <td style="border:ridge 4px red">Cell 2.1</td>
    <td style="border:ridge 4px red">Cell 2.2</td>
    <td style="border:ridge 4px red">Cell 2.3</td>
  </tr>
</table>

[在Azure DevOps Wiki中看起来像这样:

enter image description here

我希望它会对您有所帮助,但是..我强烈建议您保持降价促销的简单性。请看一下该堆栈讨论:Color in Markdown

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