我的产品有变体,我想添加悬停来更改颜色,但它没有分配类别。如果可能的话,最好编辑主题的文件并添加一个类,还是有其他方法来分配类?
输入:
<input type="radio" form="AddToCartForm-template--17856642154724__main-8518139478244" checked="checked" value="Large 59" x 47"" data-index="option1" name="Size" data-variant-input="" class="" id="ProductSelect-template--17856642154724__main-8518139478244-option-size-Large+59%22+x+47%22">
我尝试将悬停分配给其他元素,但没有成功。
试试这个:
input[name="Size"] {
width: 20px;
height: 20px;
}
input[name="Size"]:hover {
width: 20px;
height: 20px;
}
<input type="radio" form="AddToCartForm-template--17856642154724__main-8518139478244" checked="checked" value="Large 59" x 47"" data-index="option1" name="Size" data-variant-input="" class="" id="ProductSelect-template--17856642154724__main-8518139478244-option-size-Large+59%22+x+47%22">