添加target ="_ blank"在CSS中 [英] Add target="_blank" in CSS

查看:215
本文介绍了添加target ="_ blank"在CSS中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的网站顶部菜单中有外部链接. 我想在新标签页中打开这些链接.我可以使用HTML中的"target = _blank"来实现. 是否存在类似的CSS属性?

I have external links in top menu of my website. I want to open these links in new tab. I could achieve it using "target=_blank" in HTML. Is there a similar CSS property or anything else?

推荐答案

不幸的是,没有. 在2013年,无法使用纯CSS做到这一点.

Unfortunately, no. In 2013, there is no way to do it with pure CSS.

更新:感谢 showdev 链接到过时的 CSS3超链接,是的,没有浏览器实现.因此答案仍然有效.

Update: thanks to showdev for linking to the obsolete spec of CSS3 Hyperlinks, and yes, no browser has implemented it. So the answer still stands valid.

这篇关于添加target ="_ blank"在CSS中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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