CSS label:hover ~ .colaOutside .straw { 变换:旋转(15deg); }`我希望当我将鼠标悬停在吸管上时可以移动角度。但它不工作

CSS label:hover ~ .colaOutside .straw { transform: rotate(15deg); } I hope when I hover over the straw can move deg. but it is not working

[https://codepen.io/demi-chen/pen/jOrWwje][1]

label:hover ~ .colaOutside .straw { transform: rotate(15deg); }‖

我希望当我悬停在稻草上时可以移动15度。但它不工作。任何人都可以帮助我吗?谢谢!

enter image description here这样做,问题就解决了 标签 { 宽度:100%;高度:100%;显示:块;位置:绝对;顶部:0; z-index:999; } label:hover ~ .colaOutside .straw { 变换:旋转(15 度); };

问题是线路逻辑一个接一个