在 CSS 中使用 HTML 在标记后的悬停状态 [英] Using HTML in CSS After Tag for Hover State

查看:18
本文介绍了在 CSS 中使用 HTML 在标记后的悬停状态的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前正在尝试将一些 html 传递到 css 中的 :after 伪类中,以便在链接悬停后添加一个箭头.我已经在很久以前在默认安装附带的库存 WordPress 主题中看到了这一点.我觉得我必须错过一些简单的东西.

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 some 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: "»"}  

提前致谢!

推荐答案

需要使用十六进制值0BB.

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

这篇关于在 CSS 中使用 HTML 在标记后的悬停状态的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆