【发布时间】:2021-07-06 01:55:18
【问题描述】:
单击时,我需要帮助在 .wpcf7-list-item 元素上添加边框颜色。我试过 :focus & :active 并且它仍然不显示边框。 ff。是我的代码:
Contact Form 7 Multi-Steps:
<div style="display:inline; text-align:center">[radio firstpage class:firstgroup use_label_element default:1 "Spitzlift" "Rollstuhllift" "Weiß ich noch nicht"]</div>
Page Inspector:
<span class="wpcf7-form-control wpcf7-radio firstgroup">
<span class="wpcf7-list-item first">
<label><input type="radio" name="firstpage" value="Spitzlift" checked="checked"><span class="wpcf7-list-item-label">Spitzlift</span></label>
</span>
<span class="wpcf7-list-item"><label><input type="radio" name="firstpage" value="Rollstuhllift"><span class="wpcf7-list-item-label">Rollstuhllift</span></label>
</span>
<span class="wpcf7-list-item last"><label><input type="radio" name="firstpage" value="Weiß ich noch nicht"><span class="wpcf7-list-item-label">Weiß ich noch nicht</span></label>
</span>
</span>
Here's the code I used in CSS:
.firstgroup span.wpcf7-list-item:active {
border:2px solid #05b3cf
}
【问题讨论】:
-
我欢迎使用 javascript 答案来使其工作。 Onclick 事件不起作用,因为它仅在触发时适用于按钮。谢谢!
标签: javascript css hover focus