Computer >> 컴퓨터 >  >> 프로그램 작성 >> CSS

CSS로 고정/고정 바닥글을 만드는 방법은 무엇입니까?


CSS로 고정 바닥글을 만들려면 코드는 다음과 같습니다 -

예시

<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
   body{
      font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
   }
   .footer {
      font-size: 20px;
      position: fixed;
      left: 0;
      bottom: 0;
      width: 100%;
      background-color: rgb(50, 6, 100);
      color: white;
      text-align: center;
   }
</style>
</head>
<body>
<h1>Fixed/Sticky Footer Example</h1>
<div class="footer">
<p>All rights reserved ©</p>
</div>
</body>
</html>

출력

위의 코드는 다음과 같은 출력을 생성합니다 -

CSS로 고정/고정 바닥글을 만드는 방법은 무엇입니까?