AI教程网 - 未来以来,拥抱AI;新手入门,从AI教程网开始......

target 属性

CSS参考手册 AI君 52℃

实例

在新窗口中打开所有超链接,并在所有其他标签页/窗口上面放置新窗口:

a
{
target:new front;
}

亲自试一试

浏览器支持

目前没有浏览器支持 target。

定义和用法

target 属性是一个简写属性,用于设置以下属性:

  • target-name
  • target-new
  • target-position
默认值: current window above
继承性: no
版本: CSS3
JavaScript 语法: object.style.target=”new front”

语法

target: target-name target-new target-position;
描述
target-name 规定在何处打开超链接(target destination)。
target-new 规定应该在新窗口或已有窗口的新标签页中打开超链接。
target-position 规定在何处放置新的目的地链接。

注释:target-new 和 target-position 值只有在 target-name 值创建新标签页或新窗口中有效。

转载请注明:www.ainoob.cn » target 属性

喜欢 (0)or分享 (0)