:first-letter selector doesn't work for link

前端 未结 2 1632
无人及你
无人及你 2021-01-18 05:24

The :first-letter pseudo-element selector works perfectly for a

element but not for links. This, for instance, has no effect:

<         


        
2条回答
  •  被撕碎了的回忆
    2021-01-18 06:05

    According to the W3 spec, the :first-letter pseudo-element only work for a block element, which a is not.

    Oddly, *:first-letter caused the first letter to transform, at Chrome 14 and Firefox 3.6.23. Fiddle: http://jsfiddle.net/8W7FF/3/

提交回复
热议问题