Why does my img hover not work?

前端 未结 8 1178
谎友^
谎友^ 2021-01-26 02:26

I am trying to get to be set to an opacity: .04;, and when hovered over to be opacity:1; however, my img hover is not functioning. I am unsure of why t

8条回答
  •  耶瑟儿~
    2021-01-26 03:11

    It did not work because you used # instead of . on the css selector

    means you have to do

    .pic1 img:hover{ opacity: 1; }

提交回复
热议问题