css position: fixed;
css position: fixed;
position: fixed;가 있는 요소 는 뷰포트를 기준으로 배치됩니다.
즉, 페이지가 스크롤 되어도 항상 같은 위치에 유지됩니다.
위쪽, 오른쪽, 아래쪽 및 왼쪽 속성은 요소의 위치를 지정하는 데 사용됩니다.
고정 요소는 일반적으로 위치한 페이지에 간격을 두지 않습니다.
페이지의 오른쪽 아래에 고정 된 요소가 있음을 확인하십시오.
다음은 사용 된 CSS입니다.
예
div.fixed {
position: fixed;
bottom: 0;
right: 0;
width: 300px;
border: 3px solid #73AD21;
}
<!DOCTYPE html>
<html>
<head>
<style>
div.fixed {
position: fixed;
bottom: 0;
right: 0;
width: 300px;
border: 3px solid #73AD21;
}
</style>
</head>
<body>
<h2>position: fixed;</h2>
<p>An element with position: fixed; is positioned relative to the viewport, which means it always stays in the same place even if the page is scrolled:</p>
<div class="fixed">
This div element has position: fixed;
</div>
</body>
</html>

게시판 목록
퍼블리셔팁
질문은 상단의 QA에서 해주시기 바랍니다.
| 번호 | 분류 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|---|
| 1097 | CSS | 8년 전 | 2185 | ||
| 1096 | CSS | 8년 전 | 2104 | ||
| 1095 | CSS | 8년 전 | 3596 | ||
| 1094 | CSS | 8년 전 | 2281 | ||
| 1093 | CSS | 8년 전 | 1503 | ||
| 1092 | CSS | 8년 전 | 1793 | ||
| 1091 | CSS | 8년 전 | 1957 | ||
| 1090 | CSS | 8년 전 | 1920 | ||
| 1089 | HTML | 8년 전 | 4417 | ||
| 1088 | CSS | 8년 전 | 1478 | ||
| 1087 | CSS | 8년 전 | 1605 | ||
| 1086 | CSS | 8년 전 | 1512 | ||
| 1085 | CSS | 8년 전 | 1533 | ||
| 1084 | CSS | 8년 전 | 1251 | ||
| 1083 | CSS | 8년 전 | 1061 | ||
| 1082 | CSS | 8년 전 | 2159 | ||
| 1081 | CSS | 8년 전 | 1960 | ||
| 1080 | CSS | 8년 전 | 1921 | ||
| 1079 | CSS | 8년 전 | 1971 | ||
| 1078 | CSS | 8년 전 | 1665 | ||
| 1077 | CSS | 8년 전 | 1687 | ||
| 1076 | CSS | 8년 전 | 2029 | ||
| 1075 | CSS | 8년 전 | 1883 | ||
| 1074 | CSS | 8년 전 | 1696 | ||
| 1073 | CSS | 8년 전 | 1543 | ||
| 1072 | CSS | 8년 전 | 1627 | ||
| 1071 | CSS | 8년 전 | 2026 | ||
| 1070 | CSS | 8년 전 | 1608 | ||
| 1069 | CSS | 8년 전 | 1845 | ||
| 1068 | CSS | 8년 전 | 1640 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기