1
0
mirror of https://github.com/apachecn/eloquent-js-3e-zh.git synced 2025-05-23 20:02:20 +00:00
This commit is contained in:
wizardforcel 2018-05-01 23:11:43 +08:00
parent c038176def
commit 5824136d88
4 changed files with 31 additions and 0 deletions

BIN
img/4-0.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

18
img/4-1.svg Normal file
View File

@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="505" height="345" viewBox="-2 -2 505 345"><defs>
<g id="squirrel">
<path d="M 30 0 C 13 0 0 14 0 31 C 0 41 5 50 13 55 C 13 55 13 55 13 54 C 13 49 17 44 22 44 C 22 44 24 44 24 45 C 26 45 29 47 30 51 C 30 55 30 60 28 63 L 28 63 C 28 64 26 65 26 67 C 26 69 25 71 25 72 C 25 73 25 73 25 73 C 25 73 25 73 25 73 C 24 85 29 96 39 99 C 42 100 43 100 46 99 C 38 94 36 83 39 74 C 42 69 46 65 50 60 C 54 56 57 50 59 44 C 59 40 61 36 61 32 C 61 32 61 32 61 32 C 61 32 61 31 61 31 C 61 14 47 0 30 0 z" fill="#ea4" stroke="none"></path>
<path d="M 74 14 C 70 17 67 19 64 23 C 64 23 64 23 64 23 C 64 24 64 24 64 26 C 62 32 68 40 76 41 C 86 44 93 40 96 33 C 95 29 91 26 84 23 C 82 22 79 22 78 21 L 74 14 z M 79 26 C 80 26 82 27 82 28 C 82 29 80 31 79 31 C 78 31 76 29 76 28 C 76 27 78 26 79 26 z" fill="#ea4" stroke="none"></path>
<path d="M 68 41 C 68 41 68 41 68 41 L 68 41 L 68 41 C 64 46 57 56 43 71 C 43 72 42 73 42 74 C 39 81 39 88 43 94 C 43 94 45 94 45 95 C 45 95 45 95 45 95 C 46 95 46 95 46 95 C 46 95 46 95 46 95 C 46 96 47 96 47 96 C 49 97 50 97 50 99 C 53 99 55 100 57 100 L 57 100 L 96 100 C 96 100 96 100 96 100 C 99 100 100 97 100 95 C 100 94 99 91 96 91 L 96 91 L 79 91 L 78 91 L 75 91 C 75 91 75 91 75 91 C 75 91 76 91 76 90 C 76 90 78 90 78 90 C 78 90 78 90 78 90 C 78 88 78 88 78 88 C 79 88 79 88 79 88 C 79 88 79 88 79 88 C 84 83 86 77 82 73 C 79 71 76 69 74 68 C 72 68 72 68 71 68 C 71 68 71 68 70 68 C 70 68 70 68 70 68 C 70 68 68 68 68 68 C 68 68 68 68 68 68 C 68 68 68 68 68 68 C 67 68 67 68 67 68 C 67 68 67 68 67 68 C 67 68 66 68 66 68 C 66 68 66 68 66 68 C 64 68 64 69 64 69 C 63 69 63 69 62 69 C 62 69 62 69 62 69 C 61 71 61 71 61 71 C 59 71 59 71 59 72 C 59 72 59 72 59 72 C 58 72 58 72 58 72 C 58 72 58 72 58 72 C 57 73 57 73 57 73 C 57 73 57 73 57 73 C 57 73 57 73 57 73 C 55 74 55 74 55 74 C 55 74 55 74 55 74 C 55 74 55 76 55 76 C 54 76 54 76 54 77 C 54 77 54 77 54 77 L 51 76 C 51 74 53 74 53 73 C 54 72 55 71 57 69 C 61 67 64 65 70 65 C 70 65 71 65 71 65 C 72 65 74 65 74 67 C 74 65 75 65 75 64 C 76 60 79 58 82 56 C 82 56 82 56 82 56 C 83 55 84 55 86 55 L 88 55 C 88 56 91 59 93 59 C 96 59 97 56 97 54 C 97 51 96 49 93 49 L 93 49 L 79 49 L 78 45 C 75 44 71 42 68 41 z" fill="#ea4" stroke="none"></path>
</g>
<g id="pizza">
<path d="M 4 96 L 74 38 A 92 92 0 0 0 4 4 Z" stroke="#b44" stroke-width="8" fill="none" stroke-linejoin="round"></path>
<circle cx="20" cy="20" r="10" fill="#b44"></circle>
<circle cx="40" cy="30" r="9" fill="#b44"></circle>
<circle cx="15" cy="66" r="11" fill="#b44"></circle>
<circle cx="12" cy="36" r="10" fill="#b44"></circle>
<circle cx="37" cy="51" r="11" fill="#b44"></circle>
<circle cx="62" cy="34" r="8" fill="#b44"></circle>
</g>
</defs>
<g><g><path d="M 250 0 L 250 340" width="500" height="340" stroke-width="2" stroke="black"></path><path d="M 0 170 L 500 170" width="500" height="340" stroke-width="2" stroke="black"></path><rect x="0" y="0" width="500" height="340" stroke-width="2" stroke="black" fill="none"></rect></g><use x="150" y="20" opacity="0.3" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#pizza"></use><use x="20" y="20" opacity="0.3" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#squirrel"></use><text x="20" y="156" font-family="Georgia" font-size="17">No squirrel, no pizza</text><text x="199" y="153" font-family="Georgia" font-size="31">76</text><use x="150" y="190" opacity="0.3" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#pizza"></use><use x="20" y="190" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#squirrel"></use><text x="20" y="326" font-family="Georgia" font-size="17">Squirrel, no pizza</text><text x="214.5" y="323" font-family="Georgia" font-size="31">4</text><use x="400" y="20" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#pizza"></use><use x="270" y="20" opacity="0.3" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#squirrel"></use><text x="270" y="156" font-family="Georgia" font-size="17">No squirrel, pizza</text><text x="464.5" y="153" font-family="Georgia" font-size="31">9</text><use x="400" y="190" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#pizza"></use><use x="270" y="190" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#squirrel"></use><text x="270" y="326" font-family="Georgia" font-size="17">Squirrel, pizza</text><text x="464.5" y="323" font-family="Georgia" font-size="31">1</text></g></svg>

After

Width:  |  Height:  |  Size: 4.5 KiB

BIN
img/4-2.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

13
img/4-3.svg Normal file
View File

@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="393" height="76" viewBox="-2 -2 393 76"><style type="text/css">
@font-face {
font-family: 'PT Mono';
font-style: normal;
font-weight: 400;
src: local('PT Mono'), local('PTMono-Regular'), url(http://themes.googleusercontent.com/static/fonts/ptmono/v1/jmle3kzCPnW8O7_gZGRDlQ.woff) format('woff');
}
.objtext { font-family: "PT Mono"; font-size: 14px; stroke: none; }
.objbox { border-radius: 2px; fill: white; stroke: black }
.sep { stroke: #666 }
</style>
<g><g><rect x="0.5" y="0.5" width="104" height="51" class="objbox" rx="2" ry="2"></rect><text x="10" y="20" class="objtext">value: 1</text><text x="10" y="40" class="objtext">rest:</text></g><g><rect x="134.5" y="10.5" width="104" height="51" class="objbox" rx="2" ry="2"></rect><text x="144.5" y="30.5" class="objtext">value: 2</text><text x="144.5" y="50.5" class="objtext">rest:</text></g><path d="M 58.5 36.5 L 134.5 36.5" class="sep"></path><path d="M 0 0 L 3 8 L 0 7 L -3 8 Z" stroke="none" fill="rgb(102, 102, 102)" transform="translate(134.5 36.5) rotate(90) scale(1)"></path><g><rect x="268.5" y="20.5" width="120" height="51" class="objbox" rx="2" ry="2"></rect><text x="278.5" y="40.5" class="objtext">value: 3</text><text x="278.5" y="60.5" class="objtext">rest: null</text></g><path d="M 192.5 47.5 L 268.5 47.5" class="sep"></path><path d="M 0 0 L 3 8 L 0 7 L -3 8 Z" stroke="none" fill="rgb(102, 102, 102)" transform="translate(268.5 47.5) rotate(90) scale(1)"></path></g></svg>

After

Width:  |  Height:  |  Size: 1.6 KiB