json - 更改共享点列表中列的背景颜色
问题描述
我一直在尝试更改 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"
}
}
推荐阅读
- c - 如何将字符串中的单个字符转换为大写字母?
- git - 如果我没有 git lfs 锁会怎样
- java - 如何使用 cli 为配置文件更新 ~/.aws/credentials 文件中的 aws 密钥?
- python-3.x - 可以在 print() 中使用 time.sleep 吗?
- git - BitBucket 触发 Jenkins 工作
- r - 使用美国县级数据创建 Choropleth 地图
- php - 当计数达到 25 PHP 时删除最旧的行
- debugging - 自定义视觉工作室 2019
- excel - Excel VBA 打开多个 Word 应用程序导致错误
- python - 使用 Python 从列表中删除特定重复项