”工欲善其事,必先利其器。“—孔子《论语.录灵公》
首页 > 编程 > CSS可以在新选项卡中打开链接,例如\“ target = _blank \”?

CSS可以在新选项卡中打开链接,例如\“ target = _blank \”?

发布于2025-03-23
浏览:512

Can CSS Open Links in New Tabs Like \使用CSS将“ target = _blank”添加到外部链接

在新选项卡中打开外部链接是一个常见的可用性功能。 While HTML provides the "target=_blank" attribute to achieve this, you may wonder if there's a similar CSS property.

Is there a CSS alternative to "target=_blank"?

Unfortunately, no, there is not a pure CSS solution to open links in new tabs. CSS无法影响链接行为。

html solution 此设置页面上未指定目标属性的所有链接,以在新窗口或选项卡中打开。 intargs“ target = _blank” with links

test-link

这将覆盖该特定特定链接的

标签中定义的常规“ target” target = _blank。
最新教程 更多>

免责声明: 提供的所有资源部分来自互联网,如果有侵犯您的版权或其他权益,请说明详细缘由并提供版权或权益证明然后发到邮箱:[email protected] 我们会第一时间内为您处理。

Copyright© 2022 湘ICP备2022001581号-3