-
Notifications
You must be signed in to change notification settings - Fork 0
/
01.html
50 lines (45 loc) · 2.25 KB
/
01.html
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
<!DOCTYPE html>
<html lang="ko">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>svg</title>
<style>
.svg {
width: 300px;
height: 300px;
background: url('/images/face.svg') no-repeat 0 0;
}
</style>
</head>
<body>
<!-- 1. 이미지 태그로 넣는 방법 -->
<span>1. 이미지 태그로 넣는 방법</span>
<img src="/images/face.svg" alt="이미지 태그로 svg 넣기">
<!-- 2. css background 속성으로 넣는 방법 -->
<span>2. css background 속성으로 넣는 방법</span>
<div class="svg"></div>
<!-- 3. inline으로 삽입하는 방법 -->
<span>3. inline으로 삽입하는 방법</span>
<svg data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 571 625.5">
<circle cx="286.5" cy="354.5" r="251" stroke-width="40" fill="none" stroke="#000" stroke-miterlimit="10"/>
<circle cx="175" cy="380.5" r="42.5"/>
<circle cx="397" cy="380.5" r="42.5"/>
<path d="M422 476.16a181.3 181.3 0 0 1-135.48 60.59H286a181.3 181.3 0 0 1-135.48-60.59" stroke-width="30" fill="none" stroke="#000" stroke-miterlimit="10"/>
<ellipse cx="168.5" cy="210.5" rx="168.5" ry="121.5"/>
<ellipse cx="428.5" cy="198.5" rx="142.5" ry="123.5"/>
<ellipse cx="245.5" cy="103" rx="151.5" ry="103"/>
</svg>
<!-- 압축 svg -->
<span>압축 svg</span>
<svg data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 571 625.5">
<circle cx="286.5" cy="354.5" r="251" stroke-width="40" fill="none" stroke="#000" stroke-miterlimit="10"/>
<circle cx="175" cy="380.5" r="42.5"/><circle cx="397" cy="380.5" r="42.5"/><path d="M422 476.16a181.3 181.3 0 01-135.48 60.59H286a181.3 181.3 0 01-135.48-60.59" stroke-width="30" fill="none" stroke="#000" stroke-miterlimit="10"/>
<ellipse cx="168.5" cy="210.5" rx="168.5" ry="121.5"/><ellipse cx="428.5" cy="198.5" rx="142.5" ry="123.5"/>
<ellipse cx="245.5" cy="103" rx="151.5" ry="103"/>
</svg>
<!-- 4. object 태그로 넣는 방법 -->
<span>4. object 태그로 넣는 방법</span>
<object data="/images/face.svg" type="image/svg+xml"></object>
</body>
</html>