CSS-3'target-new'和html5 target ='_ blank'在新标签页中打开 [英] CSS-3 'target-new' and html5 target='_blank' for opening in new tab
问题描述
我在寻找在新标签页中打开网页的解决方案,然后我登陆CSS-3属性 target-new
I was looking into a solution for opening a page in new tab and then i landed on the CSS-3 property target-new
它说:如果用户想打开新窗口在新标签中,她可以使用以下用户样式表执行此操作:
It states that: "If a user wanted to have new windows open in new tabs instead, she could use the following user style sheet to do so:
* {target-new:tab!important}
*{ target-new: tab ! important }"
我有几个问题:
- 如何在内部运作?
- 为什么我们在html5规范中没有像target =_ tab这样的属性,但是在新标签中打开一个链接的属性与Presentation没有任何直接关系?
推荐答案
它如何在内部运作?
How it functions internally?
尚未实现此浏览器。
为什么我们没有像
target =_ tab
在html5规范中,但具有此属性,因为在新标签中打开链接与Presentation没有任何直接关系?
Why we don't have a property like
target="_tab"
in html5 specification but had this property as opening a link in new tab doesn't have any direct relation with Presentation?
target = _blank
。引入新的保留目标值,例如 _tab
,不能跨浏览器使用。
target=_blank
is still allowed because of backwards compatibility. Introducing new reserved target values, like _tab
, wouldn’t work the same across browsers.
应该留给用户,网络作者不应强制 target = _blank
或 target-new:tab | window
。
IMHO, the decision should be left to the user, and web authors shouldn’t force target=_blank
or target-new: tab|window
.
这篇关于CSS-3'target-new'和html5 target ='_ blank'在新标签页中打开的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!