您好,我正在尝试设置“type="radio"”元素的样式,但在 CSS 中访问该元素时遇到问题。请帮忙,谢谢。
HTML
<label class="questionLabel"><input class="questionInput" type="radio" name="q4" value="Strongly disagree">
CSS
.questionnaireInput radio {
width: 25px;
}
最佳答案
您可以使用属性选择器(假设您在类名为“questionInput”的 radio 之后):
.questionInput[type=radio]{
width: 25px;
}
关于css - 在 CSS 的类中选择类型元素,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55034608/