CSS Positioning Tutorials #7-12

· 7년 전 · 1116

7. Text columns

 

float를 사용안하고..

-webkit-column-count:  3;

column-count: 3;

-webkit-column-gap: 50px;

column-gap: 50px;

-webkit-column-rule:  1px solid #ccc; witdth, type, color 

column-rule: 1px solid #ccc;

text-align: justify;

 

 

8. Position relative

 

Position property의 종류: Static, Relative, Absolute, Fixed, Inherit

 

relative는

normal document flow에서 offset

 

 

9. Absolute Position

 

배너 사진 중간에 배너글을 넣을 때..

사진은 relative로 하고 글씨를 absolute로 해서..

글씨가 사진 top-left가 기준되게..

 

 

10. fixed Position

fixed는 다큐먼트에 고정됨 왼쪽위부터 시작.

navigation 메뉴를 상단에 고정시킬때

 

nav{

  background: #333;

  position: fixed;

  top: 0;

  left: 0;

  width: 100%

}

nav ul:after{

  content: "";

  display: block;

  clear: both;

}

nav li{

  list-style-type: none;

  margin: 0 10px;

  color: #fff;

  float: right;

}

 

 

11. Z-index & Stacking Order

 

nav위치를 위쪽으로 옮기면, 우선순위가 낮아 지므로 사진이 위로 올라감.

 

z-index: 1; 로 우선 순위를 바꿔줌.

 

12. clipping content

 

max-height: 150px;

over-flow: hidden;

auto, scroll, visible

 

 

|
댓글을 작성하시려면 로그인이 필요합니다.

CSS

CSS 관련 공부 및 자료 공유 소모임 게시판 입니다.

+
제목 글쓴이 날짜 조회
6년 전 조회 1,475
6년 전 조회 1,975
7년 전 조회 1,431
7년 전 조회 1,357
7년 전 조회 1,628
7년 전 조회 1,505
7년 전 조회 1,165
7년 전 조회 1,622
7년 전 조회 1,023
7년 전 조회 943
7년 전 조회 913
7년 전 조회 1,182
7년 전 조회 1,162
7년 전 조회 1,073
7년 전 조회 1,117
7년 전 조회 1,153
7년 전 조회 1,012
7년 전 조회 1,236
7년 전 조회 1,108
7년 전 조회 807
7년 전 조회 1,095
7년 전 조회 1,109
7년 전 조회 1,009
7년 전 조회 868
7년 전 조회 846
7년 전 조회 1,124
7년 전 조회 1,078
7년 전 조회 1,186
7년 전 조회 926
7년 전 조회 867