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 Preface 1. DDL 1.1 Database Ope...
Table of contents Preface interface type Appendix...
This article uses examples to illustrate the prin...
Table of contents 1. Make good use of components ...
Recently, I have been working on a large-screen d...
1. Link's to attribute (1) Place the routing ...
Rendering principle In the form element, there is...
Table of contents 1. Rule 1: Object.Method() 1.1 ...
This article summarizes the principles and usage ...
HTML stands for Hypertext Markup Language. Nowada...
Table of contents The relationship between the co...
1. Docker cross-host communication Docker cross-h...
1. delete delete is the only real way to remove a...
A distinct Meaning: distinct is used to query the...
1, %: represents any 0 or more characters. It can...