我正在使用这段代码(另请参阅JSFiddle)以更改悬停时箭头的背景颜色。但是,这不起作用,因为箭头仅在单击时更改其颜色。
summary::-webkit-details-marker {
color: #B6B6B6;
font-size: 20px;
margin-right: 2px;
}
summary::-webkit-details-marker:hover {
color: red;
}
<details class="DetailContainer">
<summary>Step by Step Guides</summary>
<details class="DetailsOne">
<summary>Getting Started</summary>
<p>1. Signup for a free trial</p>
</details>
<details class="DetailsOne">
<summary>Setting up a backup schedule</summary>
<p>This step assumes you have already signed up and installed the software</p>
</details>
</details>
The :hover
应该在details
标签(不是summary
).
试试这个,它会起作用:
details:hover summary::-webkit-details-marker:hover {
color:red;
background:white;
}
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)