What is the correct usage of CSS attr function?

后端 未结 2 499
萌比男神i
萌比男神i 2020-12-31 07:53

Since this function is implemented in IE8, I wanted to see exactly what I could do with it, but I\'m having trouble getting it to work anywhere other than the :before and :a

2条回答
  •  灰色年华
    2020-12-31 08:26

    Just use

    span.red {}
    

    for any different color, i don't think you need all combinations :)

    Or just use

    span[color="red"] {}
    

提交回复
热议问题