마침내 문제가 발견되었습니다. 절대 위치 요소와 관련이 있습니다. 나는 브라우저의 기본값 대신에 채워진 사각형을하기 위해 사용자 정의 체크 박스를 사용하고 있는데,이 코드의 일부는 input
그 자체를 position:absolute
으로 설정하여 정상적인 흐름에서 벗어났다. (따라서 왜 내 100vh
은 차이가 없었습니다.) 단순히 top: 0
을 추가하면 모두 해결되었습니다. 누군가가 왜 top
을 기본값으로 설정하면 여기에 차이가 있는지 설명 할 수 있다면 좋을 것 같습니다. (각도)
HTML
<li class="flex justify-between" *ngFor="let error of hardSummary">
<input class="m-checkbox" id="{{'h' + error.errorCode}}" type="checkbox" [(ngModel)]="error.isChecked" (click)="filterByError(error)">
<label for="{{'h' + error.errorCode}}">
{{error.errorCode}}
</label>
<span>{{error.count}}</span>
</li>
SCSS :`높이의 역할이 무엇
.m-checkbox {
position: absolute;
opacity: 0; // hide it
top: 0; // <<<<<<< THIS IS ALL THAT I NEEDED TO ADD
& + label {
position: relative;
cursor: pointer;
padding: 0;
}
// Box.
& + label:before {
content: '';
margin-right: 4px;
display: inline-block;
vertical-align: text-top;
width: 20px;
height: 20px;
background: #f4f4f4;
border: 1px solid rgba(0, 0, 0, 0.3);
border-radius: 3px;
}
// Box hover
&:hover + label:before {
background: #d8d8d8;
}
// Box focus
&:focus + label:before {
border: 1px solid #666;
}
// Box checked
&:checked + label:before {
background: #448aff;
}
// Disabled state label.
&:disabled + label {
color: #b8b8b8;
cursor: auto;
}
// Disabled box.
&:disabled + label:before {
box-shadow: none;
background: #ddd;
}
// Checkmark. Could be replaced with an image
&:checked + label:after {
content: '';
position: absolute;
left: 5px;
top: 11px;
background: white;
width: 2px;
height: 2px;
box-shadow: 2px 0 0 white, 4px 0 0 white, 4px -2px 0 white, 4px -4px 0 white, 4px -6px 0 white, 4px -8px 0 white;
transform: rotate(45deg);
transition: all 0.2s;
}
}
다음'section' 요소에 1000px'를? –
버그가 표면에 나타나는지 확인하기 만하면됩니다. 아무것도 영향을 미치지 않습니다. – redOctober13