last-child and last-of-type not working in SASS

前端 未结 3 1361
梦毁少年i
梦毁少年i 2021-01-01 15:16

How would you write this to be SASS compliant?

.fader { display: inline-block; }
.fader img:last-child {
    position: absolute;
    top: 0;         


        
3条回答
  •  伪装坚强ぢ
    2021-01-01 15:42

    Hey why don't you use only CSS? You could remove all the JS, I mean hover is support right back to ie6. I guessed that you know there is no hover event just active on tablets..

    I mean you will need to set an area for the image.. But I find it use full, especially if you want an href.

    http://codepen.io/Ne-Ne/pen/xlbck

    Just my thoughts..

提交回复
热议问题