💎一站式轻松地调用各大LLM模型接口,支持GPT4、智谱、星火、月之暗面及文生图 广告
# CSS3 target 属性 ## 实例 在新窗口中打开所有超链接,并在所有其他标签页/窗口上面放置新窗口: ``` 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](/cssref/pr_target-name.asp "CSS3 target-name 属性")_ | 规定在何处打开超链接(target destination)。 | | _[target-new](/cssref/pr_target-new.asp "CSS3 target-new 属性")_ | 规定应该在新窗口或已有窗口的新标签页中打开超链接。 | | _[target-position](/cssref/pr_target-position.asp "CSS3 target-position 属性")_ | 规定在何处放置新的目的地链接。 | 注释:target-new 和 target-position 值只有在 target-name 值创建新标签页或新窗口中有效。