小智 13
在 Firefox 和 Chrome 中删除插入符号:
details summary { list-style-type: none; } /* Firefox */
details summary::-webkit-details-marker { display: none; } /* Chrome */
details summary::marker { display: none; }Run Code Online (Sandbox Code Playgroud)
<details>
<summary>Open/Close</summary>
Lorem ipsum dolor sit.
</details>Run Code Online (Sandbox Code Playgroud)
目前在 FF 68 上,我可以通过执行以下操作来自定义标记:
summary::marker {
color: red;
}
Run Code Online (Sandbox Code Playgroud)
确保尝试以通用方式应用样式(AKA 避免嵌套类,因此您确定遍历不是问题)
此外,由于您可能正在跨浏览器添加样式,因此以下代码段无法正常工作
summary::marker,
summary::-webkit-details-marker {
color: $primary;
}
Run Code Online (Sandbox Code Playgroud)
相反,我必须像这样单独定义它:
summary::marker {
color: $primary;
}
summary::-webkit-details-marker {
color: $primary;
}
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
7234 次 |
| 最近记录: |