我試圖在:: after元素上應用更改時:懸停但它不起作用,這裏是我的代碼,請告訴我什麼是錯的,謝謝!SASS - 應用更改:: after:after hover
&::after
content: ""
width: 100%
height: 100%
background:
image: url('../img/couverture.jpg')
size: cover
position: center
repeat: no-repeat
//outline: 1px solid red
position: absolute
z-index: 1
&::after:hover
outline: 1px solid red
發佈您的完整代碼 – Hash
'&:hover'與'&:: after'同一縮進處怎麼樣? – Abhi
第二個':: after'應該嵌套在第一個?這就是你現在讀取的代碼。加上花括號可以讓事情變得更加清晰。 – ContinuousLoad