font-style : 글자 스타일
font-weight : 글자 두께
a {text-decoration:none;}
링크 글자의 밑줄을 제거해줌
position
<body>
<div class="box"></div>
<div class="box"></div>
<div class="box"></div>
</body>
position을 absolute로 지정한 경우 세 개의 div가 겹쳐서 보인다.
<style>
.box{
width:100px; height:100px;
position:absolute;
}
.box:nth-child(1){background-color: yellow;}
.box:nth-child(2){background-color: lightgray;}
.box:nth-child(3){background-color: skyblue;}
</style>
left와 top을 지정해주면 겹쳐있던 div가 모두 보인다.
<style>
.box{
width:100px; height:100px;
position:absolute;
}
.box:nth-child(1){
background-color: yellow;
left:10px; top:10ox;
}
.box:nth-child(2){
background-color: lightgray;
left:50px; top:50px;
}
.box:nth-child(3){
background-color: skyblue;
left:90px; top:90px;
}
</style>
z-index
를 이용하면 숫자가 클수록 앞에 위치한다.
<style>
.box{
width:100px; height:100px;
position:absolute;
}
.box:nth-child(1){
background-color: yellow;
left:10px; top:10px;
z-index:3 ;
}
.box:nth-child(2){
background-color: lightgray;
left:50px; top:50px;
z-index:2 ;
}
.box:nth-child(3){
background-color: skyblue;
left:90px; top:90px;
z-index:1 ;
}
</style>
내용이 요소 크기를 벗어날 때 처리
overflow
키워드 | 설명 |
---|---|
hideen | 영역을 벗어나는 부분 감춤 |
scroll | 영역을 벗어나는 부분을 스크롤로 만듦 |
overflow:hidden;
float 속성
키워드 | 설명 |
---|---|
left | 태그를 왼쪽에 붙임 |
right | 태그를 오른쪽에 붙임 |
이미지와 글이 어우러진 형태로 출력됨
img{
float:left;
}
글자에 그림자 주기
text-shadow: 5px 5px 5px black;
box-shadow : 5px 5px 5px black;