2017-04-22 2 views
1

HTML의 anchor 태그에 문제가 있습니다. 링크를 두 번 클릭하면 anchor을 넣을 수 없거나 전혀 작동하지 않는 경우가 있습니다. 이 id이 문서의 끝 부분에 거의 것을앵커 태그가 제대로 작동하지 않습니다.

<nav> 
    <ul> 
     <li><a href="#opt">option1</a></li> 
    </ul> 
</nav> 

<div id="opt"> 

공지 사항 : 여기

은 예입니다. 이 div 앞에는 섹션/헤더/기사/기타와 같은 다른 태그가 있습니다.

이전 물건 중 일부가 내 anchor 태그를 방해하는지 알 수 없습니다.

참고 : 놀랍게도 IE에서는 놀랍습니다. Chrome에 문제가 있습니다.

추가 정보가 필요하면 알려주세요.

+0

HTML에 하나 이상의'id = "opt"'가 있습니까? – Badacadabra

+1

안녕하세요 @ Badacadabra, 나는 어도비 브래킷 것들을 엉망으로 생각합니다. 파일 자체에서 html을 열었고 정상적으로 작동했습니다. 대괄호에서 동적 미리보기를 사용하고 있었는데 버그가있을 수 있습니다. – Maxi

+0

어쩌면 ... 귀하의 의견을 보내 주셔서 감사합니다. :) – Badacadabra

답변

0

<nav> 
 
    <ul> 
 
     <li><a href="#opt">option</a></li> 
 
     <li><a href="#opt1">option1</a></li> 
 
     <li><a href="#opt2">option2</a></li> 
 
     <li><a href="#opt3">option3</a></li> 
 
    </ul> 
 
</nav> 
 

 
<div id="opt"> 
 
<h1>option</h1> 
 
<p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</p> 
 
<br><br><br> 
 
</div> 
 
<div id="opt1"> 
 
<h1>option1</h1> 
 
<p>It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout. The point of using Lorem Ipsum is that it has a more-or-less normal distribution of letters, as opposed to using 'Content here, content here', making it look like readable English. Many desktop publishing packages and web page editors now use Lorem Ipsum as their default model text, and a search for 'lorem ipsum' will uncover many web sites still in their infancy. Various versions have evolved over the years, sometimes by accident, sometimes on purpose (injected humour and the like) 
 
</p> 
 

 
<br><br><br> 
 
</div> 
 
<div id="opt2"> 
 
<h1>option2</h1> 
 
<p>Contrary to popular belief, Lorem Ipsum is not simply random text. It has roots in a piece of classical Latin literature from 45 BC, making it over 2000 years old. Richard McClintock, a Latin professor at Hampden-Sydney College in Virginia, looked up one of the more obscure Latin words, consectetur, from a Lorem Ipsum passage, and going through the cites of the word in classical literature, discovered the undoubtable source. Lorem Ipsum comes from sections 1.10.32 and 1.10.33 of "de Finibus Bonorum et Malorum" (The Extremes of Good and Evil) by Cicero, written in 45 BC. This book is a treatise on the theory of ethics, very popular during the Renaissance. The first line of Lorem Ipsum, "Lorem ipsum dolor sit amet..", comes from a line in section 1.10.32.</p> 
 

 
<br><br><br> 
 
</div> 
 
<div id="opt3"> 
 
<p>The standard chunk of Lorem Ipsum used since the 1500s is reproduced below for those interested. Sections 1.10.32 and 1.10.33 from "de Finibus Bonorum et Malorum" by Cicero are also reproduced in their exact original form, accompanied by English versions from the 1914 translation by H. Rackham. 
 
</p> 
 

 
<br><br><br> 
 
</div>

0

다른 태그는 앵커 태그의 기본 동작을 변경하지 않습니다. 또한 다른 브라우저, 즉 IE에서 작동하는 경우 문서의 링크 동작을 수정하는 스크립트가 없다고 가정합니다.

Chrome에서 문제가 발생했다는 것을 알고 Chrome 확장 또는 때로는 (수정 된) 브라우저 자체가 문제라고 생각합니다. 브라우저 버전 및 확장명을 찾으십시오.

+0

안녕하세요 @ 아가 코멘트 주셔서 감사합니다! 나는 그것에 대해 살펴볼 것이다. – Maxi

관련 문제