• 회원가입
  • 로그인
  • 구글아이디로 로그인

[css] CSS - 화면분할 좌측사이드 영역 스크롤 고정 (= 이미지/메뉴 사이드 고정)

좌측 사이드 스크롤 고정

 

<style>

 #left {

    position: fixed;

    top: 0px;

    left: 0px;

    width: 30%;

    height: 100%;

    background-color: red;

    z-index: 1;

}

body {

  color:#ffffff; 

  width:70%; 

  min-height:100%; 

  float:right;

  background-color: blue;

  text-align:center; 

}

</style>


<header>헤더</header>

<body>

  <div id="left">좌측 (이미지/메뉴)</div>

  <div id="right">우측</div>

</body>

 

결과보기

참고: SplitScreen https://codepen.io/throwtoys/pen/oYGzja

PS. 좌우 방향을 바꾸려면, 위 핑크색 값을 반대로 지정. 예제보기


분류 제목
css CSS - offset-distance 속성 -
css CSS - overflow-anchor 속성 -
css CSS - box-reflect 속성 (비표준) - 요소의 반사체 생성 (= box-reflect속성 = 박…
scroll CSS - scroll-padding-block 속성 -
scroll CSS - scroll-margin-block 속성 -
scroll CSS - scroll-padding-block-start 속성 -
border CSS - border-block-start 속성 - 블락방향 시작테두리 스타일 일괄 지정 (= border…
css CSS - paint-order 속성 - SVG 요소나 텍스트 그려지는 순서 지정 (= paint-order…
scroll CSS - scroll-margin-bottom 속성 -
css CSS - offset-anchor 속성 -
border CSS - border-block-end 속성 - 블락방향 끝테두리 스타일 일괄 지정 (= border-bl…
border CSS - border-inline-end-color 속성 -
css CSS - quotes 속성 - 인용부호 모양 지정 (= quotes속성 = 쿼트스속성/쿼츠속성)
scroll CSS - scroll-padding-block-end 속성 -
border CSS - border-inline-start 속성 -
css CSS - max-block-size 속성 -
scroll CSS - scroll-margin-inline 속성 -
css CSS - mask-repeat 속성 -
css CSS - mask-position 속성 -
box CSS - margin-inline 속성 - 인라인방향 양쪽 끝 바깥 여백 주기 (= margin-inlin…
5/27
목록
찾아주셔서 감사합니다. Since 2012