【发布时间】:2020-07-04 20:28:06
【问题描述】:
我在详细信息元素中有一个摘要:
<details>
<summary>Hello</summary>
</details>
我试过了:
summary {
display: block; /* works in firefox */
list-style: none; /* works in firefox */
}
/* didn't work in any browser */
summary::marker,
summary::-webkit-details-marker {
display: none;
}
/* Solution for Chrome and Safari? */
来自这个问题How can you hide the arrow that is displayed by default on the HTML5 <details> element in Chrome?。
但这些解决方案实际上都不适用于 chrome。
如何在 chrome 中也删除此箭头?
【问题讨论】:
-
details summary::-webkit-details-marker { display:none; }(从您问题中的链接复制)在 Chrome v80 jsfiddle.net/e2jLzumd987654322@ 中工作。 -
details > summary::-webkit-details-marker { display: none; }在 chrome 80 中也适用于我。见本页底部:developer.mozilla.org/en-US/docs/Web/HTML/Element/… -
从你的 css 中删除行:
summary::marker,- 它似乎破坏了 chrome -
这应该是正确的答案