
[WiseSaying]
-CRUD 주말에 구현해본거 복습
[프론트엔드]
text-align: center/*div의 display가 inline-block으로 설정됐을때*/
div {
padding: 50px;
margin: 50px;
}
section > div:nth-child(1){
background-color:green;
}
section > div:firstchild(1){
background-color:green;
}
/* 마지막에서 두번째자식 */
section > div:nth-last-child(2){
background-color:green;
}
/* 막내 */
section > div:last-child{
background-color:green;
}
/* section의 둘째 자식 */
section > :nth-child(2){
background-color:green;
}
/* div 타입중의 두번째자식 */
section > :nth-of-type(2){
background-color:green;
}
/* 짝수 */
section > :nth-child(2n){
background-color:green;
}
/* 3의배수 */
section > :nth-child(3n){
background-color:gold;
}
/* 홀수 */
section > :nth-child(2n+1){
background-color:gold;
}
부모element > 자식element {
text align: center;
}
body{
margin: 0;
}
div {
height: 100px;
background-color: #afafaf;
margin-right: auto;
margin-left: auto;
width: 300px;
}
.a { 쩜 a라고 하면, 별명 a인 놈! <div class= "a">section> .a {
background-color: gold;
}<div class= "a b">section> .a.b {
background-color = pink;<div class = "">
<div id = "">
border-radius: 50px 50px 50px 50px;
/*(좌측상단부터 시계방향)*/
border-radius: 50%
/*원*/
a {
color: inherit;
text-decoration: none;
}