我一直在尝试更改 Sharepoint 列表中某列的背景颜色,但没有完全成功。
我一直在使用下面的 JSON 代码,但令我烦恼的是它没有填充整个单元格。
{
"$schema": "https://developer.microsoft.com/json-schemas/sp/column-formatting.schema.json",
"elmType": "div",
"debugMode": true,
"txtContent": "@currentField",
"style": {
"background-color": "pink"
}
}
您对如何解决这个问题有什么想法吗?
谢谢
这是由于
min-height
属性设置造成的。
作为解决方法,您可以放大
min-height
以使其填满整个单元格。
示例:
{
"$schema": "https://developer.microsoft.com/json-schemas/sp/column-formatting.schema.json",
"elmType": "div",
"debugMode": true,
"txtContent": "@currentField",
"style": {
"min-height":"56px",
"background-color": "pink"
}
}
我的柱子高度各不相同。有没有办法在没有最小高度的情况下做到这一点