hidden
selector : tag, id, class
tag :
div{
width : 300px; height : 300px;
}
id :
-> 하나만 지정가능
여러개의 id : 맨 위 하나의 id만 적용됨
#header{
background-color: blue; (배경색)
}
#content{
background-color: red; (배경색)
}
#footer{
background-color: yellow; (배경색)
}
class : 여러개 동시에 적용 가능
.fontcolor{
color : white;
}
px => pixel : 절대값
% 단위 (-100%~100%) :상대값
: 부모 기준
height를 %단위로 사용하려면 부모의 height를 지정해놔야함
vh: variable height
-> 현재 화면 기준...
vw : variable width
margin : 바깥쪽 여백
body{
left : 0, top:0
}
padding : 안쪽 여백
INLINE BLOCK
float : right
오른쪽 기준으로 그려.
float : left
왼쪽 기준으로 그려.
=> 공중에 뜸
clear :both; -> float 속성을 제거
rgba() : a -> alpha(투명도)
ex) rgba(0,84,255,0.6=>투명도)
반응형
댓글