여기에 약간 문제가있어 문제를 해결할 수 없습니다.사용 된 HTML 앵커 태그 뒤에 내용이 숨겨 짐
하나의 페이지 웹 사이트를 만들고 있는데, 내 탐색 막대에 3 개의 링크가 있습니다. 그 중 하나를 클릭하면 곧바로 특정 div로 스크롤해야하며, 그렇게됩니다. 하지만 지금은 내가 정한 고정 헤더 뒤에 있습니다.
HTML
<div class="header1">
.... blablabla...
</div>
<div class="navigbox">
<div class="navig">
<a href="#intro">About</a>
</div>
</div>
<div id="intro">
some text
</div>
CSS
헤더의 높이를 때 페이지 스크롤로 간주되지 않기 때문이다.header1{
height: 20%; width: 100%;
position: fixed;
z-index: 1;
left:0;
right:0;
top: 0;
margin-left:auto;
margin-right:auto;}
.navigbox{
background: white;
position: fixed;
z-index: 1;
height: 10%; width: 80%;
left: 10%;
top: 20%;}
.navig{
height: 100%; width: 33.33%;
float:letf;}
#intro{
background: white;
height: 60%; width: 70%;
left: 10%;
top: 30%;
position: absolute;
padding: 5% 5% 0 5%;}
사실 내가 말한 것보다 더 좋은 방법 일 것입니다. – Geo1088