Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | |||||
3 | 4 | 5 | 6 | 7 | 8 | 9 |
10 | 11 | 12 | 13 | 14 | 15 | 16 |
17 | 18 | 19 | 20 | 21 | 22 | 23 |
24 | 25 | 26 | 27 | 28 | 29 | 30 |
Tags
- 서평단
- 독후감
- 시각화
- Tistory
- 텐서플로
- 서평
- 파이썬 시각화
- 통계학
- Pandas
- 한빛미디어서평단
- 티스토리
- 블로그
- MATLAB
- tensorflow
- SQL
- MySQL
- python visualization
- Visualization
- Python
- 파이썬
- 리눅스
- matplotlib
- Google Analytics
- Blog
- 딥러닝
- Ga
- 한빛미디어
- 매틀랩
- 월간결산
- Linux
Archives
- Today
- Total
pbj0812의 코딩 일기
[CSS] CSS 로 산타 그리기 본문
0. 목표
- CSS 로 산타 그리기
- flow chart
1. 실습
1) html
<div class="santa">
<div class="body">
<div class="body1"></div>
<div class="body2"></div>
</div>
<div class="face">
<div class="hat">
<div class="body"></div>
<div class="top"></div>
<div class="bottom">
<div class="rectangle"></div>
<div class="circle1"></div>
<div class="circle2"></div>
</div>
</div>
<div class="mustache"></div>
<div class="nose"></div>
<div class="eye">
<div class="left">
<div class="rectangle"></div>
<div class="circle1"></div>
<div class="circle2"></div>
</div>
<div class="right">
<div class="rectangle"></div>
<div class="circle1"></div>
<div class="circle2"></div>
</div>
</div>
<div class="mouth"></div>
<div class="button">
<div class="button1"></div>
<div class="button2"></div>
</div>
</div>
2) CSS
*, *:after, *:before {
box-sizing: border-box;
}
body {
background: #d0ddf8;
}
.santa {
position: relative;
margin: 50px auto;
width: 400px;
height: 400px;
}
.santa .body .body1{
position: absolute;
bottom: -350px;
width: 400px;
height: 150px;
background: #ff0000;
}
.santa .body .body2{
position: absolute;
top: 400px;
width: 400px;
height: 200px;
/* border-radius: 100%; */
border-top-right-radius: 200px;
border-top-left-radius: 200px;
background: #ff0000;
}
.santa .face{
position: absolute;
top: 120px;
left: 25px;
width: 350px;
height: 350px;
border-radius: 100%;
background: #ffffff;
}
.santa .hat .body{
position: absolute;
top: -80px;
left: 75px;
border-bottom: 100px solid red;
border-left: 200px solid transparent;
}
.santa .hat .bottom .rectangle{
position: absolute;
top: 15px;
left: 60px;
width: 230px;
height: 40px;
background: #d3d3d3;
}
.santa .hat .bottom .circle1{
position: absolute;
top: 15px;
left: 40px;
width: 40px;
height: 40px;
border-radius: 100%;
background: #d3d3d3;
}
.santa .hat .bottom .circle2{
position: absolute;
top: 15px;
left: 267px;
width: 40px;
height: 40px;
border-radius: 100%;
background: #d3d3d3;
}
.santa .hat .top{
position: absolute;
top: -100px;
left: 260px;
width: 50px;
height: 50px;
border-radius: 100%;
background: #d3d3d3;
}
.santa .mustache{
position: absolute;
top: 200px;
left: 50px;
width: 250px;
height: 200px;
border-radius: 100%;
background: #d3d3d3;
}
.santa .nose{
position: absolute;
top: 180px;
left: 155px;
width: 40px;
height: 40px;
border-radius: 100%;
background: #ff0000;
}
.santa .eye .left .circle1{
position: absolute;
top: 125px;
left: 100px;
width: 20px;
height: 20px;
border-radius: 100%;
background: #000000;
}
.santa .eye .left .circle2{
position: absolute;
top: 135px;
left: 100px;
width: 20px;
height: 20px;
border-radius: 100%;
background: #000000;
}
.santa .eye .left .rectangle{
position: absolute;
top: 135px;
left: 100px;
width: 20px;
height: 10px;
background: #000000;
}
.santa .eye .right .circle1{
position: absolute;
top: 125px;
left: 210px;
width: 20px;
height: 20px;
border-radius: 100%;
background: #000000;
}
.santa .eye .right .circle2{
position: absolute;
top: 135px;
left: 210px;
width: 20px;
height: 20px;
border-radius: 100%;
background: #000000;
}
.santa .eye .right .rectangle{
position: absolute;
top: 135px;
left: 210px;
width: 20px;
height: 10px;
background: #000000;
}
.santa .mouth{
position: absolute;
top: 250px;
left: 155px;
width: 25px;
height: 25px;
border-radius: 100%;
background: #000000;
}
.santa .button .button1{
position: absolute;
top: 420px;
left: 155px;
width: 40px;
height: 40px;
border-radius: 100%;
background: #000000;
}
.santa .button .button2{
position: absolute;
top: 500px;
left: 155px;
width: 40px;
height: 40px;
border-radius: 100%;
background: #000000;
}
2. 완성
3. 참고
'ComputerLanguage_Program > CSS' 카테고리의 다른 글
[CSS] 농구공 들고있는 진국이 그리기 (0) | 2021.02.22 |
---|---|
[CSS] 컵에 낀 병아리 (0) | 2021.01.27 |
[CSS] 태극 문양 그리기 (0) | 2020.08.15 |
[CSS] 탱크 그리기 (0) | 2020.06.24 |
[CSS] 곰 그리기 (0) | 2020.05.08 |
Comments