V 30일차 - HTML과 CSS_2

박태은·2024년 7월 18일

V 웹개발자 프로젝트

목록 보기
31/59

nav>({|}+section>a[href="#"]{아이템 $})*7+{|}

inline요소(글자) 정렬 -> 부모에의해서 수동정렬(text-align:center)
block요소 정렬 -> margin을 이용해서 스스로 정렬

nth-child
aaa:first-child
aaa:last-child
only-child 형제가없는 존재
first-of-type
last-of-type

child, type 공부!

.a == class
#a == id


예시

body {
background-color:black;
}
nav {
text-align:center;
margin:auto;
}
div {
text-align:center;
width:25px;
height:25px;
background-color:gray;
display:inline-block;

}

div:first-child {
background-color:white;
}
nav:last-child>div{
border-radius:50%;
margin-top:120px;
}

div:hover {
background-color:white;
cursor:pointer;
}

profile
취업준비생. 웹개발자를 목표로.

0개의 댓글