添加目标=“_blank"在 CSS 中 [英] Add target="_blank" in CSS

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

问题描述

我的网站顶部菜单中有外部链接.

I have external links in the top menu of my website.

我想在新标签页中打开这些链接.我可以在 HTML 中使用 target=_blank 来实现它.是否有类似的 CSS 属性或其他任何东西?

I want to open these links in new tabs. 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.

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

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