Common ways to set anchor positioning in html

高洛峰
Release: 2017-03-02 14:57:45
Original
1845 people have browsed it

I know several ways to set anchor positioning in html, using id positioning, using name positioning, and using js positioning. You can refer to these methods below. I know several ways to set anchor positioning in html, and I would like to share them with you:

1. Use id positioning:

The code is as follows:

锚点1 

11111111111
11111111111
11111111111
11111111111
11111111111
11111111111
11111111111
11111111111
11111111111
11111111111
11111111111
11111111111
11111111111
11111111111
11111111111
11111111111

Copy after login


Such positioning can be targeted at any tag.

2. Use name positioning:
The code is as follows:


The name attribute can only be used to position the a tag, but not other tags such as p. Play a positioning role.

3. Use js positioning

The code is as follows:

  • Copy after login


    ##For more related articles on common methods of setting anchor positioning in HTML, please Follow PHP Chinese website!


    source:php.cn
    Statement of this Website
    The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
    Latest Downloads
    More>
    Web Effects
    Website Source Code
    Website Materials
    Front End Template
    About us Disclaimer Sitemap
    php.cn:Public welfare online PHP training,Help PHP learners grow quickly!