开发者

Using HTML in CSS After Tag for Hover State

开发者 https://www.devze.com 2023-02-15 04:53 出处:网络
I am currently trying to pass in some html into the the :after pseudo class in css to add an arrow after a link once hovered on.I have seen this done quite s开发者_C百科ome time ago in the stock WordP

I am currently trying to pass in some html into the the :after pseudo class in css to add an arrow after a link once hovered on. I have seen this done quite s开发者_C百科ome time ago in the stock WordPress theme that used to ship with the default install. I feel like I must me missing something simple.

a:hover:after{content: "»"}  

thank in advance!


You need to use the hex value \00BB.

http://jsfiddle.net/durilai/AGDbH/


You're looking for, I think:

a:hover:after
{
content: "\00bb";
}

JS Fiddle demo

Link to reference: http://css-tricks.com/snippets/html/glyphs/

0

精彩评论

暂无评论...
验证码 换一张
取 消