Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to use the target-name attribute in css

2025-02-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/01 Report--

Xiaobian to share with you how to use the target-name attribute in css, I believe most people still do not know how to use it, so share this article for your reference, I hope you have a lot of harvest after reading this article, let's go to understand it together!

csstarget-name attribute definition and usage

In CSS, the target-name attribute is used to specify where to open the hyperlink. If you need to set target-name, target-new and target-position attributes at the same time, you can use the target abbreviation attribute. The target attribute can define these three attributes in one declaration at the same time. The target-name attribute is a new attribute in css3 and is currently not supported by mainstream browsers.

target-name attribute syntax format

css syntax: target-name:current/root/parent/new/modal/name

JavaScript syntax: object.style.targetName="new"

Attribute Value Description

current: Opens a hyperlink in the frame, tab, or window where the link is located

root: Hyperlink in the current tab or window

parent: Opens the hyperlink in the parent frame. If the current frame does not have a parent frame, the value is treated as root

new: Create a new destination

modal: Opens a new window in a new (temporarily created) modal window

name: Opens a link in an existing frame, window, or tab. If name destination does not exist, create a new destination with that name

examples

The css3target-name attribute specifies where to open the hyperlink

a{target-name:new;}

No browsers currently support target-name!

Welcome to php Chinese website

The above is "how to use the target-name attribute in css" all the contents of this article, thank you for reading! I believe that everyone has a certain understanding, hope to share the content to help everyone, if you still want to learn more knowledge, welcome to pay attention to the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report