There are several ways I know of to set anchor positioning in HTML, let me share them with you: 1. Use id positioning: Copy code The code is as follows:<a href="#1F" name="1F">Anchor Point 1</a> <div name="1F"> <p> 11111111111 </br> 11111111111 </br>11111111111 </br>11111111111 </br>11111111111 </br>11111111111 </br>11111111111 </br>11111111111 </br>11111111111 </br>11111111111 </br>11111111111 </br>11111111111 </br>11111111111 </br>11111111111 </br>11111111111 </br>11111111111 </br> </p> </div> This positioning can be targeted at any label. 2. Use name positioning: Copy code The code is as follows:<a href="#5F">Anchor Point 5</a> </br></br></br></br></br></br></br></br></br></br></br></br></br></br></br></br></br></br></br></br> <a name="5F">1111111</href> The name attribute can only be used to locate the a tag, but it cannot be used to locate other tags such as div. 3. Use js positioning Copy code The code is as follows:<li class="" onclick="javascript:document.getElementById('here').scrollIntoView()"></li> |
<<: Summary of @ usage in CSS (with examples and explanations)
>>: Detailed explanation of Docker compose orchestration tool
Table of contents summary Environment and tool pr...
The css animation of the rotating flip effect, th...
1. SSH remote management SSH is a secure channel ...
Seamless carousel is a very common effect, and it...
The previous article introduced how to achieve a ...
1. Introduction Recently, I often encounter devel...
MyISAM, a commonly used storage engine in MySQL c...
Table of contents Install and configure dnsmasq I...
In the process of web front-end development, UI d...
Preface In the Linux kernel, netfilter is a subsy...
1. Add a hard disk 2. Check the partition status:...
Table of contents Prepare Five weapons for…in Obj...
The day before yesterday, I encountered a problem...
Compared with vue2, vue3 has an additional concep...
XML/HTML CodeCopy content to clipboard < input...