생활에 가까운 컨텐츠를 만드는것을 아주 추천!
body{
/* 마진이 갖고 있는 초기값을 명시(0이라는 뜻) */
margin:initial;
/* 너비가 갖는 초기값(부모를 기준으로 가득찬다 = auto)*/
width: initial;
/* 배경색의 초기값은 투명*/
background-color: initial;
/* 높이가 갖는 초기값(자식을 기준으로 가득찬다 = auto)*/
height: initial;
}
div{
background-color: orange;
width: 400px;
height: 400px;
margin: 20px;
padding: 100px;
border: 20px solid red;
}
div{
background-color: orange;
width: 400px;
}
div{
background-color: orange;
width: 400px;
margin-left: auto;
}
div{
background-color: orange;
width: 400px;
margin-left: auto;
margin-right: auto;
}
.header img.profile{
border: 10px solid white;
border-radius: 200px / 20px;
}
블록레벨의 상하단 마진은 겹친다.
reset-css CDN by jsDelivr - A CDN for npm and GitHub
.icon{
display: inline-block;
width: 48px;
height: 48px;
border: 1px solid #ddd;
border-radius: 30px;
color: white;
background-image: url(images/icons.png);
background-size: 144px 96px;
}
.icon.github{
background-color: black;
background-position: left top;
}
.icon.facebook{
background-color: dodgerblue;
background-position: center top;
}
.icon.email{
background-color: orangered;
background-position: right top;
}
.icon:hover{
background-position-y: bottom;
}
<!DOCTYPE html>
<html>
<head>
<title>CHECKLIST</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<div class="wrapper">
<article class="bucketlist">
<div class="header">
<h1>My Bucket List</h1>
</div>
<div class="section">
<ul class="list">
<li>Travel all around the world</li>
<li>Learn a new language</li>
<li>Try a profession in a different field</li>
<li>Achieve your ideal weight</li>
<li>Run a marathon</li>
</ul>
</div>
</article>
</div>
</body>
</html>
ul{
list-style-type: none;
margin: 0;
padding: 0;
}
h1{
margin: 0;
font-size: initial;
font-weight: initial;
}
body{
background-color: #ddd;
}
.wrapper{
margin: 100px auto;
width: 450px;
}
.bucketlist{
background-color: white;
border: 1px solid #ddd;
border-radius: 15px;
height: auto;
overflow: hidden;
box-shadow: 0 0 10px 0 rgb(192, 192, 192);
}
.header{
border-left: 5px solid rgb(255, 73, 103);
}
.header h1{
margin: 20px ;
font-size: 20px;
font-weight: bold;
color: rgb(255, 73, 103);
}
.section{
background-color: rgb(247, 247, 247);
padding: 10px 20px;
border-top: 3px solid rgb(235, 235, 235);
}
.list li{
display: block;
color: gray;
background-color: white;
margin: 10px 0;
padding: 10px;
border: 3px solid rgb(235, 235, 235);
border-radius: 10px;
}
.list li:hover{
border: 3px solid rgb(38, 114, 255);
color: rgb(38, 114, 255);
}