728x90
๐ ๊ฒ์ ํจ๊ณผ : ๊ฒ์ ๊ฒ์ ๋ง๋ค๊ธฐ
์ด๋ฒ ์๊ฐ์๋ ์ง๊ธ๊น์ง ๋ฐฐ์ ๋ ๋ด์ฉ์ ์์ฉํ์ฌ ๋จ์ด ๊ฒ์์ ๋ง๋ค์ด๋ณด๊ฒ ์ต๋๋ค!
#1. HTML / CSS ์ค์ ํ๊ธฐ
โ๏ธ HTML ์คํฌ๋ฆฝํธ ๋ณด๊ธฐ
<div class="search__wrap">
<div class="search__audio">
<span class="play">
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M15 6.3706C15 4.65827 12.9884 3.73774 11.6926 4.85712L8.36317 7.73321C7.99989 8.04704 7.53583 8.21972 7.05576 8.21973L5.49998 8.21974C4.11928 8.21975 3 9.33903 3 10.7197V14.0127C3 15.3934 4.11929 16.5127 5.5 16.5127H7.0558C7.53587 16.5127 7.99993 16.6854 8.36322 16.9992L11.6926 19.8753C12.9884 20.9947 15 20.0741 15 18.3618V12.3662V6.3706Z" fill="#223547" stroke="#223547" stroke-width="1.5"/>
<path d="M18 15.3667C18.6279 14.531 19 13.4923 19 12.3667C19 11.2411 18.6279 10.2024 18 9.3667" stroke="#223547" stroke-width="1.5" stroke-linecap="round"/>
<path d="M20 18.3667C21.2558 16.6954 22 14.6179 22 12.3667C22 10.1155 21.2558 8.03802 20 6.3667" stroke="#223547" stroke-width="1.5" stroke-linecap="round"/>
</svg>
</span>
<span class="stop">
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M14 6.3706C14 4.65827 11.9884 3.73774 10.6926 4.85712L7.36317 7.73321C6.99989 8.04704 6.53583 8.21972 6.05576 8.21973L4.49998 8.21974C3.11928 8.21975 2 9.33903 2 10.7197V14.0127C2 15.3934 3.11929 16.5127 4.5 16.5127H6.0558C6.53587 16.5127 6.99993 16.6854 7.36322 16.9992L10.6926 19.8753C11.9884 20.9947 14 20.0741 14 18.3618V12.3662V6.3706Z" fill="#223547" stroke="#223547" stroke-width="1.5"/>
<path d="M18 14.1215L22.2427 9.87891" stroke="#223547" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M18 9.87894L22.2427 14.1216" stroke="#223547" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
</svg>
</span>
<audio id="audio" src="../assets/audio/searchAudio04.mp3" loop="loop"></audio>
</div>
<span>CSS ์์ฑ ๊ฒ์ ์ด๋ฒคํธ</span>
<h1><a href="searchEffect.html">2๋ถ ๋์ CSS ์์ฑ ๊ฒ์ํ๊ธฐ</a></h1>
<p class="desc">
2๋ถ ๋์ CSS ์์ฑ์ ๋ง์ด ๊ฒ์ํ๋ฉด ์ ์๊ฐ ์ฌ๋ผ๊ฐ๋๋ค.<br>
์์ฑ์ด ๊ธฐ์ต๋์ง ์์ผ๋ฉด, ํํธ ๋ณด๊ธฐ๋ฅผ 1ํ ์ด์ฉํ ์ ์์ต๋๋ค.
</p>
<div class="time">
<span>2:00</span>
</div>
<div class="search__box">
<label for="search">๊ฒ์ํ๊ธฐ</label>
<input type="text" id="search" placeholder="CSS ์์ฑ์ ์
๋ ฅํด ์ฃผ์ธ์" />
<div class="start">๋ฒํผ์ ๋๋ฅด๋ฉด ๊ฒ์์ด ์์๋ฉ๋๋ค.</div>
</div>
<div class="search__info center">
<div>์ ์ฒด ์์ฑ ๊ฐ์ : <span class="num">0</span></div>
<div>๋งํ ๊ฐ์ : <span class="now">0</span></div>
</div>
<div class="search__answers"></div>
<div class="search__missAnswers"></div>
<div class="search__list"></div>
<div class="search__result">
<div class="svg__wrap">
<svg xmlns="http://www.w3.org/2000/svg" width="448px" height="386px" viewBox="0 0 448 386">
<g filter="none" transform="translate(218.184,198.765) translate(-217.528,-187.235)" style="animation: 3.9s linear infinite both bee-a0_ft;">
<g id="bee-Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" transform="translate(217.528,187.235) translate(-218.184,-198.765)">
<g id="bee-Artboard" transform="translate(218.184,198.765) translate(-1258.18,-1122.76)">
<g id="bee-drop" fill="#946BC6" transform="translate(1394.27,1301.5) translate(-27.7667,-6.5)">
<rect id="bee-Rectangle" width="25.9539" height="13" rx="6.5" transform="translate(12.977,6.5) translate(-12.977,-6.5)" />
<path id="bee-Oval" d="M6.5,0C7.80436,3.3445,3.58985,6.5,0,6.5C-3.58985,6.5,-7.26635,3.5071,-6.5,0C-4.53336,-9,-3.53336,-17.5,0,-17.5C3.46664,-17.5,4.55118,-4.99697,6.5,0Z" transform="translate(49.0334,-83.5)" style="animation: 3.9s linear infinite both bee-Oval_t, 3.9s linear infinite both bee-Oval_d;" />
</g>
<g id="bee-scene" transform="translate(1258.18,1122.76) translate(-218.184,-198.765)">
<g id="bee-flower-2" transform="translate(90.0588,372) translate(0,-206.381)" style="animation: 3.9s linear infinite both bee-flower-2_t;">
<path id="bee-Path-9" d="M0.941176,206.381C-1.72549,120.715,1.27451,69.7147,9.94118,53.3814C11.9977,49.5056,14.27,45.7426,16.7582,42.0921L16.7582,42.0921C30.4776,21.9638,51.6942,8.17626,75.6598,3.81498C105.444,-1.60524,131.705,-1.24978,154.441,4.88136C198.941,16.8814,204.941,19.8814,210.441,24.8814C214.108,28.2147,234.275,48.8814,270.941,86.8814" stroke="#7AB6AE" stroke-width="6" transform="translate(135.471,103.191) translate(-135.471,-103.191)" />
<g id="bee-Group-3-Copy-3" fill="#7AB6AE" transform="translate(264.26,81.0804) rotate(91) translate(-15.2019,-15.6629)">
<rect id="bee-Rectangle-2" width="29.6325" height="13.1271" rx="6.56355" transform="translate(15.2019,6.88946) translate(-14.8162,-6.56355)" />
<rect id="bee-Rectangle-Copy-7" width="29.6325" height="12.5416" rx="6.27078" transform="translate(23.7473,16.1837) rotate(-90) translate(-14.8162,-6.27078)" />
</g>
<g id="bee-Flower-Copy-2" transform="translate(288.54,108.447) rotate(133) translate(-30.4805,-32.3833)">
<g id="bee-Group-2" fill="#946BC4" transform="translate(30.2037,10.1784) translate(-22.289,-10.1784)">
<rect id="bee-Rectangle-3" width="11" height="16.6487" rx="5.5" transform="translate(5.5,12.0325) translate(-5.5,-8.32434)" />
<rect id="bee-Rectangle-Copy-5" width="11" height="16.6487" rx="5.5" transform="translate(22.5658,8.32434) translate(-5.5,-8.32434)" />
<rect id="bee-Rectangle-Copy-6" width="11" height="16.6487" rx="5.5" transform="translate(39.078,12.0325) translate(-5.5,-8.32434)" />
</g>
<path id="bee-Combined-Shape" d="M30.3952,4.26124C39.0927,4.26124,46.9394,7.90412,52.4926,13.7473C50.6453,14.7714,49.3952,16.74,49.3952,19.0006L49.3952,19.0006L49.395,34.1675C47.7715,34.6076,46.0485,34.5367,44.4656,33.9634L44.4656,33.9634L44.4666,23.8117C44.4666,20.498,41.7803,17.8117,38.4666,17.8117C35.1529,17.8117,32.4666,20.498,32.4666,23.8117L32.4666,23.8117L32.4657,33.5686L32.0548,33.797C31.0514,34.3544,29.8179,34.2904,28.8775,33.6322L28.8775,33.6322L28.8427,33.6076L28.8432,23.8117C28.8432,20.498,26.1569,17.8117,22.8432,17.8117C19.5295,17.8117,16.8432,20.498,16.8432,23.8117L16.8432,23.8117L16.8427,33.1626L16.31,33.502C15.1865,34.217,13.7261,34.1057,12.7239,33.2288L12.7239,33.2288L11.9147,32.5206L11.9147,19.0006C11.9147,16.6001,10.505,14.5289,8.46835,13.5696C14.0105,7.83045,21.786,4.26124,30.3952,4.26124Z" fill="#CB90EB" transform="translate(30.4805,19.3569) translate(-30.4805,-19.3569)" />
<path id="bee-Combined-Shape-2" d="M55.0037,12.6397C58.2938,12.6397,60.961,15.3069,60.961,18.5971L60.961,33.7508L60.9587,33.9117C60.9602,34.0363,60.961,34.1611,60.961,34.2861C60.961,51.12,47.3144,64.7666,30.4805,64.7666C13.6466,64.7666,0,51.12,0,34.2861L0.00219882,33.9143C0.000736059,33.86,0,33.8055,0,33.7508L0,18.5971C0,15.3069,2.66719,12.6397,5.95733,12.6397C9.24747,12.6397,11.9147,15.3069,11.9147,18.5971L11.9147,32.1618L12.7239,32.87C13.7261,33.7469,15.1865,33.8582,16.31,33.1432L16.8427,32.8038L16.8432,23.4529C16.8432,20.1392,19.5295,17.4529,22.8432,17.4529C26.1569,17.4529,28.8432,20.1392,28.8432,23.4529L28.8427,33.2488L28.8775,33.2734C29.8179,33.9316,31.0514,33.9956,32.0548,33.4382L32.4657,33.2098L32.4666,23.4529C32.4666,20.1392,35.1529,17.4529,38.4666,17.4529C41.7803,17.4529,44.4666,20.1392,44.4666,23.4529L44.4656,33.6046C45.9365,34.1374,47.5285,34.2363,49.0492,33.8944C49.0469,33.8466,49.0463,33.7988,49.0463,33.7508L49.0463,18.5971C49.0463,15.3069,51.7135,12.6397,55.0037,12.6397Z" fill="#946BC6" transform="translate(30.4805,38.7032) translate(-30.4805,-38.7032)" />
</g>
</g>
<g id="bee-flower-3" transform="translate(89.1929,372.5) translate(0,-241)" style="animation: 3.9s linear infinite both bee-flower-3_t;">
<g id="bee-Group-3-Copy-5" fill="#7AB6AE" transform="translate(286.509,69.6629) translate(-15.2019,-15.6629)">
<rect id="bee-Rectangle-4" width="29.6325" height="13.1271" rx="6.56355" transform="translate(15.2019,6.88946) translate(-14.8162,-6.56355)" />
<rect id="bee-Rectangle-Copy-7-2" width="29.6325" height="12.5416" rx="6.27078" transform="translate(23.7473,16.1837) rotate(-90) translate(-14.8162,-6.27078)" />
</g>
<path id="bee-Path-10" d="M0.8071,241C-0.269033,219.056,-0.269033,203.389,0.8071,194C5.58952,152.274,26.6818,123.699,66.3071,107.5C97.6881,94.6713,146.256,109.316,194.807,104C240.474,99,273.64,85.3333,294.307,63" stroke="#7AB6AE" stroke-width="5" transform="translate(147.154,152) translate(-147.154,-152)" />
<g id="bee-Flower-Copy-3" transform="translate(312.878,45.4049) rotate(46) translate(-30.4805,-32.3833)">
<g id="bee-Group-2-2" fill="#946BC4" transform="translate(30.2037,10.1784) translate(-22.289,-10.1784)">
<rect id="bee-Rectangle-5" width="11" height="16.6487" rx="5.5" transform="translate(5.5,12.0325) translate(-5.5,-8.32434)" />
<rect id="bee-Rectangle-Copy-5-2" width="11" height="16.6487" rx="5.5" transform="translate(22.5658,8.32434) translate(-5.5,-8.32434)" />
<rect id="bee-Rectangle-Copy-6-2" width="11" height="16.6487" rx="5.5" transform="translate(39.078,12.0325) translate(-5.5,-8.32434)" />
</g>
<path id="bee-Combined-Shape-3" d="M30.3952,4.26124C39.0927,4.26124,46.9394,7.90412,52.4926,13.7473C50.6453,14.7714,49.3952,16.74,49.3952,19.0006L49.3952,19.0006L49.395,34.1675C47.7715,34.6076,46.0485,34.5367,44.4656,33.9634L44.4656,33.9634L44.4666,23.8117C44.4666,20.498,41.7803,17.8117,38.4666,17.8117C35.1529,17.8117,32.4666,20.498,32.4666,23.8117L32.4666,23.8117L32.4657,33.5686L32.0548,33.797C31.0514,34.3544,29.8179,34.2904,28.8775,33.6322L28.8775,33.6322L28.8427,33.6076L28.8432,23.8117C28.8432,20.498,26.1569,17.8117,22.8432,17.8117C19.5295,17.8117,16.8432,20.498,16.8432,23.8117L16.8432,23.8117L16.8427,33.1626L16.31,33.502C15.1865,34.217,13.7261,34.1057,12.7239,33.2288L12.7239,33.2288L11.9147,32.5206L11.9147,19.0006C11.9147,16.6001,10.505,14.5289,8.46835,13.5696C14.0105,7.83045,21.786,4.26124,30.3952,4.26124Z" fill="#CB90EB" transform="translate(30.4805,19.3569) translate(-30.4805,-19.3569)" />
<path id="bee-Combined-Shape-4" d="M55.0037,12.6397C58.2938,12.6397,60.961,15.3069,60.961,18.5971L60.961,33.7508L60.9587,33.9117C60.9602,34.0363,60.961,34.1611,60.961,34.2861C60.961,51.12,47.3144,64.7666,30.4805,64.7666C13.6466,64.7666,0,51.12,0,34.2861L0.00219882,33.9143C0.000736059,33.86,0,33.8055,0,33.7508L0,18.5971C0,15.3069,2.66719,12.6397,5.95733,12.6397C9.24747,12.6397,11.9147,15.3069,11.9147,18.5971L11.9147,32.1618L12.7239,32.87C13.7261,33.7469,15.1865,33.8582,16.31,33.1432L16.8427,32.8038L16.8432,23.4529C16.8432,20.1392,19.5295,17.4529,22.8432,17.4529C26.1569,17.4529,28.8432,20.1392,28.8432,23.4529L28.8427,33.2488L28.8775,33.2734C29.8179,33.9316,31.0514,33.9956,32.0548,33.4382L32.4657,33.2098L32.4666,23.4529C32.4666,20.1392,35.1529,17.4529,38.4666,17.4529C41.7803,17.4529,44.4666,20.1392,44.4666,23.4529L44.4656,33.6046C45.9365,34.1374,47.5285,34.2363,49.0492,33.8944C49.0469,33.8466,49.0463,33.7988,49.0463,33.7508L49.0463,18.5971C49.0463,15.3069,51.7135,12.6397,55.0037,12.6397Z" fill="#946BC6" transform="translate(30.4805,38.7032) translate(-30.4805,-38.7032)" />
</g>
</g>
<g id="bee-leg-l" transform="translate(192,343.25) translate(-9.5,-40.75)">
<path id="bee-leg1" d="M9,71.5L14,71.5C16.7614,71.5,19,73.7386,19,76.5C19,79.2614,16.7614,81.5,14,81.5L0,81.5L0,81.5L0,80.5C0,75.5294,4.02944,71.5,9,71.5Z" fill="#283138" transform="translate(9.5,76.5) translate(-9.5,-76.5)" />
</g>
<g id="bee-leg-m-r" transform="translate(237.5,340.75) translate(-9.5,-43.25)">
<path id="bee-leg3" d="M9,76.5L14,76.5C16.7614,76.5,19,78.7386,19,81.5C19,84.2614,16.7614,86.5,14,86.5L0,86.5L0,86.5L0,85.5C0,80.5294,4.02944,76.5,9,76.5Z" fill="#283138" transform="translate(9.5,81.5) scale(-1,1) translate(-9.5,-81.5)" />
</g>
<g id="bee-leg-r" transform="translate(258.693,329) translate(-9.5,-55)" />
<g id="bee-plants" transform="translate(94.5778,321.5) translate(-94.5778,-64.5)">
<path id="bee-Rectangle-6" d="M42.5,0C67.9051,0,88.5,20.5949,88.5,46L88.5,96C88.5,100.418,84.9183,104,80.5,104L50.5,104C46.0817,104,42.5,100.418,42.5,96L42.5,0L42.5,0Z" fill="#537B88" transform="translate(65.5,52) translate(-65.5,-52)" />
<path id="bee-Path" d="M13,11.5L63.9874,61.1217C67.3073,64.3527,70.0833,68.0989,72.208,72.2155L73.3927,74.5109C75.7858,79.1475,77.5192,84.0959,78.5425,89.2124L80,96.5L80,96.5L85.9454,92.1761C89.2899,89.7437,93.0299,87.9079,97,86.75L97.3619,86.6444C101.108,85.5518,104.968,84.8927,108.864,84.6801L130.5,83.5L130.5,83.5L133.11,88.4305C134.33,90.735,136.329,92.5316,138.75,93.5L138.964,93.5858C141.228,94.4913,143.759,94.4604,146,93.5C148.265,92.5294,150.129,90.8123,151.282,88.6346L154,83.5L154,83.5L188.5,83.5L186.564,93.1802C185.859,96.7031,184.584,100.087,182.789,103.199L181.04,106.232C179.027,109.72,176.458,112.857,173.434,115.518L171.75,117C167.619,120.636,162.854,123.48,157.693,125.392L152,127.5L152,127.5L66.5,129L10.5,73L7.25395,67.3194C4.11471,61.8257,2.07543,55.7733,1.25,49.5L1.03648,47.8772C0.350899,42.6668,0.592462,37.3762,1.75,32.25C2.90438,27.1377,5.09549,22.3167,8.18776,18.0852L13,11.5L13,11.5Z" fill="#7AB6AE" transform="translate(94.5778,70.25) translate(-94.5778,-70.25)" />
</g>
<g id="bee-flower-1" transform="translate(105,344.5) translate(-62.9058,-344.5)" style="animation: 3.9s linear infinite both bee-flower-1_t;">
<g id="bee-Group-3-Copy-2" fill="#7AB6AE" transform="translate(32.4334,179.29) rotate(-136) translate(-15.2019,-15.6629)">
<rect id="bee-Rectangle-7" width="29.6325" height="13.1271" rx="6.56355" transform="translate(15.2019,6.88946) translate(-14.8162,-6.56355)" />
<rect id="bee-Rectangle-Copy-7-3" width="29.6325" height="12.5416" rx="6.27078" transform="translate(23.7473,16.1837) rotate(-90) translate(-14.8162,-6.27078)" />
</g>
<g id="bee-Group-9" transform="translate(81.0586,181.765) translate(-81.0586,-181.765)">
<g id="bee-Group-3" fill="#7AB6AE" transform="translate(103.222,73.0275) translate(-14.8162,-15.337)">
<rect id="bee-Rectangle-8" width="29.6325" height="13.1271" rx="6.56355" transform="translate(14.8162,6.56355) translate(-14.8162,-6.56355)" />
<rect id="bee-Rectangle-Copy-7-4" width="29.6325" height="12.5416" rx="6.27078" transform="translate(23.3617,15.8578) rotate(-90) translate(-14.8162,-6.27078)" />
</g>
<g id="bee-flower-1-2" transform="translate(81.0586,181.765) translate(-81.0586,-181.765)">
<g id="bee-leaves" transform="translate(35.6112,110.782) translate(-35.4924,-37.2335)">
<path id="bee-Rectangle-9" d="M35.287,0C54.8931,0,70.787,15.8939,70.787,35.5L70.787,59.5C70.787,66.1274,65.4144,71.5,58.787,71.5L53.037,71.5C43.2339,71.5,35.287,63.5531,35.287,53.75L35.287,0L35.287,0Z" fill="#527B88" transform="translate(53.037,35.75) translate(-53.037,-35.75)" />
<path id="bee-Rectangle-10" d="M18,22.0124C36.8613,22.0124,52.2317,37.1494,52.5203,56.0085L52.9848,86.3585L52.9848,86.3585L48.979,85.8952C31.3224,83.8532,18,68.9013,18,51.127L18,22.0124L18,22.0124Z" fill="#7AB6AE" transform="translate(35.4924,54.1855) rotate(-46) translate(-35.4924,-54.1855)" />
</g>
<g id="bee-Group-8" transform="translate(81.0586,181.765) translate(-81.0586,-181.765)">
<g id="bee-Group-7" stroke="#7AB6AE" stroke-width="6" transform="translate(63.9058,205.5) translate(-49.5,-146.5)">
<path id="bee-Path-7" d="M99,0C86.5722,15.2623,78.2389,26.929,74,35C63.5795,54.8408,58.5351,71.8019,57.5,86.5C55,122,58.406,210.019,56,247C53.594,283.981,43.5,285,41,293" transform="translate(70,146.5) translate(-70,-146.5)" />
<path id="bee-Path-8" d="M0,120L13.25,120C17.3956,120,21.5202,120.589,25.5,121.75C29.4648,122.906,33.1775,124.796,36.4455,127.322L37,127.75C40.6505,130.571,43.9104,133.864,46.6944,137.543L56.5,150.5L56.5,150.5" transform="translate(28.25,135.25) translate(-28.25,-135.25)" />
</g>
<g id="bee-flower1" transform="translate(19.4275,179.229) translate(-19.4275,-22.5293)">
<g id="bee-Group-3-Copy" fill="#7AB6AE" transform="translate(32.4334,22.5899) rotate(-136) translate(-15.2019,-15.6629)">
<rect id="bee-Rectangle-11" width="29.6325" height="13.1271" rx="6.56355" transform="translate(15.2019,6.88946) translate(-14.8162,-6.56355)" />
<rect id="bee-Rectangle-Copy-7-5" width="29.6325" height="12.5416" rx="6.27078" transform="translate(23.7473,16.1837) rotate(-90) translate(-14.8162,-6.27078)" />
</g>
<ellipse id="bee-Oval-2" fill="#BB80DC" rx="14.4572" ry="14.4572" transform="translate(14.4572,22.5)" />
</g>
<g id="bee-Flower" transform="translate(128.476,45.4049) rotate(46) translate(-30.4805,-32.3833)">
<g id="bee-Group-2-3" fill="#946BC4" transform="translate(30.2037,10.1784) translate(-22.289,-10.1784)">
<rect id="bee-Rectangle-12" width="11" height="16.6487" rx="5.5" transform="translate(5.5,12.0325) translate(-5.5,-8.32434)" />
<rect id="bee-Rectangle-Copy-5-3" width="11" height="16.6487" rx="5.5" transform="translate(22.5658,8.32434) translate(-5.5,-8.32434)" />
<rect id="bee-Rectangle-Copy-6-3" width="11" height="16.6487" rx="5.5" transform="translate(39.078,12.0325) translate(-5.5,-8.32434)" />
</g>
<path id="bee-Combined-Shape-5" d="M30.3952,4.26124C39.0927,4.26124,46.9394,7.90412,52.4926,13.7473C50.6453,14.7714,49.3952,16.74,49.3952,19.0006L49.3952,19.0006L49.395,34.1675C47.7715,34.6076,46.0485,34.5367,44.4656,33.9634L44.4656,33.9634L44.4666,23.8117C44.4666,20.498,41.7803,17.8117,38.4666,17.8117C35.1529,17.8117,32.4666,20.498,32.4666,23.8117L32.4666,23.8117L32.4657,33.5686L32.0548,33.797C31.0514,34.3544,29.8179,34.2904,28.8775,33.6322L28.8775,33.6322L28.8427,33.6076L28.8432,23.8117C28.8432,20.498,26.1569,17.8117,22.8432,17.8117C19.5295,17.8117,16.8432,20.498,16.8432,23.8117L16.8432,23.8117L16.8427,33.1626L16.31,33.502C15.1865,34.217,13.7261,34.1057,12.7239,33.2288L12.7239,33.2288L11.9147,32.5206L11.9147,19.0006C11.9147,16.6001,10.505,14.5289,8.46835,13.5696C14.0105,7.83045,21.786,4.26124,30.3952,4.26124Z" fill="#CB90EB" transform="translate(30.4805,19.3569) translate(-30.4805,-19.3569)" />
<path id="bee-Combined-Shape-6" d="M55.0037,12.6397C58.2938,12.6397,60.961,15.3069,60.961,18.5971L60.961,33.7508L60.9587,33.9117C60.9602,34.0363,60.961,34.1611,60.961,34.2861C60.961,51.12,47.3144,64.7666,30.4805,64.7666C13.6466,64.7666,0,51.12,0,34.2861L0.00219882,33.9143C0.000736059,33.86,0,33.8055,0,33.7508L0,18.5971C0,15.3069,2.66719,12.6397,5.95733,12.6397C9.24747,12.6397,11.9147,15.3069,11.9147,18.5971L11.9147,32.1618L12.7239,32.87C13.7261,33.7469,15.1865,33.8582,16.31,33.1432L16.8427,32.8038L16.8432,23.4529C16.8432,20.1392,19.5295,17.4529,22.8432,17.4529C26.1569,17.4529,28.8432,20.1392,28.8432,23.4529L28.8427,33.2488L28.8775,33.2734C29.8179,33.9316,31.0514,33.9956,32.0548,33.4382L32.4657,33.2098L32.4666,23.4529C32.4666,20.1392,35.1529,17.4529,38.4666,17.4529C41.7803,17.4529,44.4666,20.1392,44.4666,23.4529L44.4656,33.6046C45.9365,34.1374,47.5285,34.2363,49.0492,33.8944C49.0469,33.8466,49.0463,33.7988,49.0463,33.7508L49.0463,18.5971C49.0463,15.3069,51.7135,12.6397,55.0037,12.6397Z" fill="#946BC6" transform="translate(30.4805,38.7032) translate(-30.4805,-38.7032)" />
</g>
</g>
</g>
</g>
</g>
<g id="bee-bee" transform="translate(224.5,185.29) translate(-105,-114.943)" style="animation: 3.9s linear infinite both bee-bee_t;">
<g transform="translate(99.4377,210.746) translate(-32.0265,-22.3044)" style="animation: 3.9s linear infinite both bee-a1_t;">
<rect id="bee-Rectangle-13" width="29.5" height="44" rx="14.75" fill="#FFA521" transform="translate(11.2509,22.975) translate(-14.75,-22)" style="animation: 3.9s linear infinite both bee-Rectangle-13_t;" />
<rect id="bee-Rectangle-Copy-12" width="29.5" height="44" rx="14.75" fill="#FFA521" transform="translate(45.3387,22.975) translate(-14.75,-22)" style="animation: 3.9s linear infinite both bee-Rectangle-Copy-12_t;" />
</g>
<g transform="translate(112.695,185.347) translate(-112.695,-199.854)" style="animation: 3.9s linear infinite both bee-a2_t;">
<g id="bee-body" transform="translate(105.5,147.52) translate(-77.5,-77.5)">
<ellipse id="bee-Oval-Copy-2" fill="#283138" rx="77.5" ry="77.5" transform="translate(77.5,77.5)" />
<path id="bee-Combined-Shape-7" d="M145.808,114.141C141.546,122.07,135.944,129.172,129.304,135.143L25.696,135.143C19.0564,129.172,13.4541,122.07,9.19189,114.141ZM154.248,66.658C154.744,70.2008,155,73.8205,155,77.5C155,80.9432,154.775,84.3339,154.34,87.6584L0.659782,87.6584C0.224542,84.3339,0,80.9432,0,77.5C0,73.8205,0.256423,70.2008,0.752375,66.658ZM123.524,15.1394C131.261,20.8595,137.897,27.9855,143.053,36.1401L11.9473,36.1401C17.1031,27.9855,23.7386,20.8595,31.4763,15.1394Z" fill="#FFA521" transform="translate(77.5,75.1411) translate(-77.5,-75.1411)" />
</g>
<g transform="translate(105,99.71) translate(-105,-83.7987)" style="animation: 3.9s linear infinite both bee-a3_t;">
<g id="bee-wings" fill="#B1E2EF" transform="translate(165.5,136.75) translate(-165,-151.855)" style="animation: 3.9s linear infinite both bee-wings_t;">
<rect id="bee-Rectangle-Copy-11" width="158" height="79.5" rx="39.75" transform="translate(168.025,157.166) rotate(60) translate(-158,-39.75)" style="animation: 3.9s linear infinite both bee-Rectangle-Copy-11_t;" />
<rect id="bee-Rectangle-14" width="188.5" height="81" rx="40.5" transform="translate(175.924,154.237) translate(-175.924,-70.8827)" style="animation: 3.9s linear infinite both bee-Rectangle-14_t;" />
</g>
<g id="bee-antennas" stroke="#202528" stroke-linecap="round" stroke-width="5" transform="translate(130,99.2503) translate(-19.4971,-35.5418)" style="animation: 3.9s linear infinite both bee-antennas_t;">
<path id="bee-Path-6" d="M0,36.5L0.139392,33.1081C0.854467,15.708,15.5398,2.18202,32.94,2.8971C33.4607,2.9185,33.9809,2.95281,34.5,3L34.5,3L34.5,3" transform="translate(17.25,19.685) translate(-17.25,-19.685)" />
<path id="bee-Path-6-Copy" d="M32.5,36.5L32.6394,33.1081C33.3545,15.708,48.0398,2.18202,65.44,2.8971C65.9607,2.9185,66.4809,2.95281,67,3L67,3L67,3" transform="translate(49.75,19.685) translate(-49.75,-19.685)" />
</g>
<g id="bee-face" transform="translate(105,129.75) translate(-105,-43.5)">
<path id="bee-Path-3" stroke="#336775" stroke-width="5" opacity="0.968169" d="M209.5,43.5L119,43.5" transform="translate(164.25,43.5) translate(-164.25,-43.5)" />
<g id="bee-Group-5" transform="translate(124.708,46.5) translate(-71,-36.5)">
<rect id="bee-Rectangle-15" fill="#FFA521" width="142" height="73" rx="36" transform="translate(71,36.5) translate(-71,-36.5)" />
<ellipse id="bee-Oval-3" fill="#FFFFFF" rx="29.8575" ry="29.8575" transform="translate(36.1492,36)" />
<ellipse id="bee-Oval-Copy-3" fill="#FFFFFF" rx="29.8575" ry="29.8575" transform="translate(106.649,36)" />
<path id="bee-Combined-Shape-8" d="M37.6205,15.3575C39.5734,15.3575,41.463,15.6287,43.2537,16.1355C41.0876,17.8939,39.7039,20.5773,39.7039,23.5838C39.7039,28.8795,43.9969,33.1725,49.2926,33.1725C52.512,33.1725,55.3608,31.5859,57.0998,29.152C57.8533,31.2948,58.263,33.5995,58.263,36L58.263,37.4713C58.263,48.8718,49.0211,58.1138,37.6205,58.1138L36.1492,58.1138C24.7487,58.1138,15.5067,48.8718,15.5067,37.4713L15.5067,36C15.5067,24.5995,24.7487,15.3575,36.1492,15.3575L37.6205,15.3575Z" fill="#283138" transform="translate(36.8849,36.7356) translate(-36.8849,-36.7356)" style="animation: 3.9s linear infinite both bee-Combined-Shape-8_t;" />
<path id="bee-Combined-Shape-Copy-2" d="M97.0055,15.3575C98.9584,15.3575,100.848,15.6287,102.639,16.1355C100.473,17.8939,99.0889,20.5773,99.0889,23.5838C99.0889,28.8795,103.382,33.1725,108.678,33.1725C111.897,33.1725,114.746,31.5859,116.485,29.152C117.238,31.2948,117.648,33.5995,117.648,36L117.648,37.4713C117.648,48.8718,108.406,58.1138,97.0055,58.1138L95.5342,58.1138C84.1337,58.1138,74.8917,48.8718,74.8917,37.4713L74.8917,36C74.8917,24.5995,84.1337,15.3575,95.5342,15.3575L97.0055,15.3575Z" fill="#283138" transform="translate(96.2699,36.7356) translate(-96.2699,-36.7356)" style="animation: 3.9s linear infinite both bee-Combined-Shape-Copy-2_t;" />
</g>
<path id="bee-Path-11" stroke="#336775" stroke-width="5" d="M129.5,43.5L119.5,43.5" transform="translate(124.5,43.5) translate(-124.5,-43.5)" />
<g id="bee-eye-covers" transform="translate(125.475,15.1468) scale(0.8,0) translate(-65.4172,0)" style="animation: 3.9s linear infinite both bee-eye-covers_t;">
<path fill="#ffa521" stroke="none" d="M30.5342,0C30.5566,2.49713,-30.5104,1.82316,-30.5342,0C-30.709,-13.3918,-16.8636,-24.25,0,-24.25C16.8636,-24.25,30.414,-13.3924,30.5342,0Z" transform="translate(30.535,0) scale(1,1.3) translate(0.000815516,24.25)" />
<path fill="#ffa521" stroke="none" d="M30.5342,0C30.5566,2.49713,-30.5104,1.82316,-30.5342,0C-30.709,-13.3918,-16.8636,-24.25,0,-24.25C16.8636,-24.25,30.414,-13.3924,30.5342,0Z" transform="translate(100.299,0) scale(1,1.3) translate(0.000815516,24.25)" />
</g>
<g id="bee-eye-covers-2" transform="translate(125.475,79) rotate(180) scale(0.7,0) translate(-65.4172,0)" style="animation: 3.9s linear infinite both bee-eye-covers-2_t;">
<path fill="#ffa521" stroke="none" d="M30.5342,0C30.5566,2.49713,-30.5104,1.82316,-30.5342,0C-30.709,-13.3918,-16.8636,-24.25,0,-24.25C16.8636,-24.25,30.414,-13.3924,30.5342,0Z" transform="translate(30.535,0) scale(1,1.3) translate(0.000815516,24.25)" />
<path fill="#ffa521" stroke="none" d="M30.5342,0C30.5566,2.49713,-30.5104,1.82316,-30.5342,0C-30.709,-13.3918,-16.8636,-24.25,0,-24.25C16.8636,-24.25,30.414,-13.3924,30.5342,0Z" transform="translate(100.299,0) scale(1,1.3) translate(0.000815516,24.25)" />
</g>
<ellipse id="bee-Oval-4" stroke="#336775" stroke-width="6" rx="40.5" ry="40.5" transform="translate(79.5,43.5)" />
<ellipse id="bee-Oval-Copy-4" stroke="#336775" stroke-width="6" rx="40.5" ry="40.5" transform="translate(169.5,43.5)" />
<path id="bee-Path-4" d="M121.068,70C122.115,71,123.258,71.5,124.5,71.5C125.742,71.5,127.052,71,128.432,70" stroke="#313942" stroke-width="4" stroke-linecap="round" transform="translate(124.75,70.75) translate(-124.75,-70.75)" />
<path id="bee-Path-5" d="M39,43.5L21.0069,43.5C18.024,43.5,15.0628,44.0072,12.25,45C9.47075,45.9809,7.01648,47.7105,5.15796,49.9979L4.75,50.5C2.61996,53.1216,1.20802,56.2519,0.652707,59.5838L0,63.5L0,63.5" stroke="#336775" stroke-width="5" stroke-linecap="round" transform="translate(19.5,53.5) translate(-19.5,-53.5)" />
</g>
</g>
</g>
</g>
<g id="bee-leg-m-l" transform="translate(212.5,329.75) translate(-9.5,-54.25)">
<path id="bee-leg2" d="M9,98.5L14,98.5C16.7614,98.5,19,100.739,19,103.5C19,106.261,16.7614,108.5,14,108.5L0,108.5L0,108.5L0,107.5C0,102.529,4.02944,98.5,9,98.5Z" fill="#283138" transform="translate(9.5,103.5) translate(-9.5,-103.5)" />
</g>
</g>
</g>
</g>
<path d="M-1.66219,-1.66219L-1.66219,32.6228L-1.66219,72.6228" stroke="#283138" fill="none" stroke-width="5" stroke-linecap="round" transform="translate(197.506,293.347)" style="animation: 3.9s linear infinite both bee-a4_d;" />
<path d="M0,0L0,-65.1141L0,-99.2912" stroke="#283138" fill="none" stroke-width="5" stroke-linecap="round" transform="translate(215.806,362.47)" style="animation: 3.9s linear infinite both bee-a5_d;" />
<path d="M0,0L0.150197,-42.3555L0.25,-70.5" stroke="#283138" fill="none" stroke-width="5" stroke-linecap="round" transform="translate(231.594,362.47)" style="animation: 3.9s linear infinite both bee-a6_d;" />
<g transform="translate(258.037,321.72) translate(-9.5,-50.75)">
<path d="M0,0L0,-61.2126L0,-104.133" stroke="#283138" fill="none" stroke-width="5" stroke-linecap="round" stroke-linejoin="round" transform="translate(2.17979,95)" style="animation: 3.9s linear infinite both bee-a7_d;" />
<g transform="translate(0.5,96.5)" style="animation: 3.9s linear infinite both bee-a8_t;">
<path id="bee-leg4" d="M9,100L14,100C16.7614,100,19,102.239,19,105C19,107.761,16.7614,110,14,110L0,110L0,110L0,109C0,104.029,4.02944,100,9,100Z" fill="#283138" transform="translate(0,0) scale(-1,1) translate(-19,-105)" style="animation: 3.9s linear infinite both bee-leg4_t;" />
</g>
</g>
</g>
</svg>
<div class="result"></div>
<button class="restart">๋ค์ ๋์ ํ๊ธฐ</button>
</div>
</div>
</div>
! CSS TIP !
์ํ๋ ์คํ์ผ์ ๋ง์ถฐ ์ง์ ํด์ฃผ์๋ฉด ๋ฉ๋๋ค! ์๋์ ์ฝ๋๋ ์ฐธ๊ณ ์ฉ์ผ๋ก ๋ด์ฃผ์ธ์!
โ๏ธ CSS ์คํฌ๋ฆฝํธ ๋ณด๊ธฐ
:root {
--htmlColor: #223547;
}
.searchGame {
display: none;
z-index: 20;
}
.search__wrap {
max-width: 1000px;
height: 600px;
overflow-y: scroll;
border: 3px solid var(--htmlColor);
border-radius: 20px;
background-color: #f1f3f6;
position: relative;
padding: 30px;
text-align: center;
}
.search__wrap > span {
font-size: 20px;
margin-bottom: 20px;
display: inline-block;
color: var(--htmlColor);
}
.search__wrap > h1 {
color: var(--htmlColor);
font-size: 48px;
margin-bottom: 10px;
}
.search__wrap .time {
width: 200px;
height: 60px;
line-height: 60px;
text-align: center;
margin: 20px auto 0px auto;
border-radius: 20px;
background: var(--htmlColor);
}
.search__wrap .time span {
color: #fff;
font-size: 34px;
font-weight: 100;
}
.search__box {
margin-bottom: 20px;
position: relative;
}
.search__box label {
position: absolute;
clip: rect(0 0 0 0);
width: 1px;
height: 1px;
margin: -1px;
overflow: hidden;
}
.search__box input {
border: 2px solid var(--htmlColor);
padding: 15px 40px;
width: 60%;
border-radius: 50px;
font-size: 20px;
margin-top: 20px;
}
.search__box .start {
position: absolute;
left: 50%; bottom: 0;
transform: translateX(-50%);
background: #223547;
width: 60%;
border-radius: 50px;
font-size: 20px;
border: 2px solid var(--htmlColor);
padding: 15px 40px;
color: #fff;
cursor: pointer;
}
.search__list li {
text-align: left;
line-height: 1.7;
}
.search__list li.hide {
display: none;
}
.search__list li.show {
display: block;
}
.search__list span {
display: inline-block;
padding: 10px 20px;
border: 1px solid var(--htmlColor);
border-radius: 10px;
margin: 5px;
text-align: left;
cursor: pointer;
}
.search__list span:hover {
background-color: var(--htmlColor);
color: #fff;
transition: all 0.3s;
}
.search__list em {
float: right;
font-style: normal;
}
.search__list .line {
margin-top: 70px;
margin-bottom: 50px;
}
.search__list .line li {
background: #e3eaf5;
margin-bottom: 5px;
border-radius: 10px;
padding: 10px 30px;
}
.search__list .line li:hover {
background: #c2d5f5;
cursor: pointer;
}
.search__info {
text-align: right;
margin-bottom: 20px;
padding-bottom: 10px;
border-bottom: 2px dashed var(--htmlColor);
color: var(--htmlColor);
}
.search__info.center {
display: flex;
justify-content: center;
grid-gap: 10px;
padding-bottom: 20px;
}
.search__info .type {
margin-bottom: 10px;
text-align: center;
}
.search__info .all {
display: inline;
margin-bottom: 10px;
}
.search__info .all span {
border-bottom: 2px solid var(--htmlColor);
border-radius: 5px;
padding: 10px;
display: inline-block;
margin-bottom: 4px;
font-weight: 500;
}
.search__info .all span:hover {
background-color: var(--htmlColor);
color: #fff;
cursor: pointer;
}
.search__info .keyword {
display: inline;
margin-bottom: 10px;
}
.search__info .keyword span {
border-bottom: 2px solid var(--htmlColor);
border-radius: 5px;
padding: 10px;
display: inline-block;
margin-bottom: 4px;
font-weight: 500;
}
.search__info .keyword span:hover {
background-color: var(--htmlColor);
color: #fff;
cursor: pointer;
}
.search__info div:nth-child(3) {
text-align: right;
}
.search__info div:nth-child(4) {
text-align: right;
}
.search__info .searchResult.hide {
display: none;
}
.search__answers {
border-bottom: 2px dashed var(--htmlColor);
padding-bottom: 40px;
padding-top: 10px;
}
.search__answers span {
display: inline-block;
background: var(--htmlColor);
padding: 10px 20px;
color: #fff;
border-radius: 30px;
margin: 3px;
}
.search__missAnswers {
border-bottom: 2px dashed var(--htmlColor);
padding: 40px 0;
margin-bottom: 30px;
}
.search__missAnswers span {
display: inline-block;
border: 1px solid var(--htmlColor);
color: var(--htmlColor);
padding: 10px 20px;
border-radius: 30px;
margin: 3px;
}
.search__desc {
padding: 20px 40px 20px 60px;
margin-bottom: 30px;
display: inline-block;
background-image: url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='11' cy='11' r='8' stroke='white' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M16.5 16.958L21.5 21.958' stroke='white' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
background-color: var(--htmlColor);
color: #fff;
border-radius: 50px;
background-repeat: no-repeat;
background-position: 24px 18px;
}
.search__click {
margin-top: 10px;
margin-bottom: 30px;
}
.search__click li {
display: inline;
}
.search__click li a {
display: inline-block;
border: 1px solid var(--htmlColor);
border-radius: 50px;
padding: 10px 20px;
margin: 5px 0;
}
.search__click li a:hover {
background-color: var(--htmlColor);
color: #fff;
}
.search__audio {
cursor: pointer;
margin-bottom: 10px;
}
.search__audio .play {
display: none;
}
/* .search-close {
position: absolute;
top: 30px;
right: 30px;
background: url(../img/effect_icon08.svg) no-repeat;
width: 24px;
height: 24px;
background-size: 24px;
} */
.search__result {
position: fixed;
left: 1vw;
top: 1vw;
width: 500px;
height: 500px;
border-radius: 50%;
background: white;
border: 5px solid #223547;
transform: scale3d(0, 0, 0);
z-index: 1;
align-items: center;
color: #223547;
font-weight: 300;
justify-content: center;
display: none;
}
.search__result.show {
display: flex;
animation: rubberBand 1s 0.6s ease forwards;
}
.search__result .result {
margin-top: 10px;
font-size: 16px;
line-height: 1.4;
}
.search__result .restart {
background: #223547;
color: #fff;
border: 0;
border-radius: 10px;
font-size: 20px;
padding: 5px 20px;
display: inline-block;
margin-top: 10px;
cursor: pointer;
}
@keyframes rubberBand {
from {
transform: scale3d(1, 1, 1);
}
30% {
transform: scale3d(1.25, 0.75, 1);
}
40% {
transform: scale3d(0.75, 1.25, 1);
}
50% {
transform: scale3d(1.15, 0.85, 1);
}
65% {
transform: scale3d(0.95, 1.05, 1);
}
75% {
transform: scale3d(1.05, 0.95, 1);
}
to {
transform: scale3d(1, 1, 1);
}
}
@media (max-width: 1360px) {
.search__box .start {
width: 60%;
}
.search__box input {
width: 60%;
}
}
@media (max-width: 730px){
.search__box .start {
width: 80%;
}
.search__box input {
width: 80%;
}
}
@media (max-width: 600px) {
.search__wrap {
padding: 20px;
}
.search__wrap > h1 {
font-size: 24px;
}
.search__wrap > span {
font-size: 16px;
margin-bottom: 10px;
}
.search__box input {
font-size: 16px;
padding: 12px 30px;
}
.search__box .start {
font-size: 16px;
padding: 12px 30px;
}
}
/* footer */
#footer {
text-align: center;
}
#footer a {
color: #000;
font-family: "SCoreDream";
padding-bottom: 50px;
}
#footer a:hover {
text-decoration: underline;
}
/* modal__wrap */
.modal__wrap {
text-align: left;
font-family: "SCoreDream";
}
.modal__btn {
color: white;
background-color: #1f224a;
border-radius: 50px;
display: inline-block;
padding: 10px 20px;
position: fixed;
right: 20px;
bottom: 10px;
cursor: pointer;
transition: background-color 0.3s, color 0.3s;
font-family: "SCoreDream";
}
.modal__btn:hover {
background-color: white;
color: #1f224a;
}
.modal__cont {
width: 100%;
height: 100vh;
z-index: 10;
background-color: rgba(255, 255, 255, 0.3);
position: fixed;
left: 0;
top: 0;
overflow-x: hidden;
display: flex;
align-items: center;
justify-content: center;
transform: scale(0);
}
.modal__box {
width: 80%;
min-width: 400px;
border-radius: 0.6rem;
background-color: #fff;
box-shadow: 0 10px 20px -5px hsl(180deg 2% 10%);
height: 70vh;
transform: scale(0);
}
.modal__box .title {
padding-inline: 1rem;
cursor: grab;
background-color: hsl(180 2% 10%);
display: flex;
align-items: center;
color: #fff;
height: 50px;
border-top-left-radius: 0.5rem;
border-top-right-radius: 0.5rem;
}
.modal__box .title .plus {
background: #282b2e;
padding: 0.5rem 0.5rem 0.3rem 0.5rem;
border-radius: 0.5rem;
}
.modal__box .title .dot {
width: 15px;
height: 15px;
background-color: #cc7832;
display: inline-block;
border-radius: 50%;
position: relative;
margin-left: 25px;
}
.modal__box .title .dot::before {
content: "";
position: absolute;
left: 25px;
top: 0;
width: 15px;
height: 15px;
background-color: #6a8759;
border-radius: 50%;
}
.modal__box .title .dot::after {
content: "";
position: absolute;
right: 25px;
top: 0;
width: 15px;
height: 15px;
background-color: #b30000;
border-radius: 50%;
}
.modal__box .title .tabs {
display: flex;
margin-left: 45px;
}
.modal__box .title .tabs > div {
color: hsl(39 33% 66%);
background-color: hsl(22 7% 29%);
padding: 0.35rem 0.7rem 0.25rem 0.8rem;
margin-right: 0.65rem;
display: flex;
align-items: center;
border-radius: 0.4rem;
text-transform: uppercase;
cursor: pointer;
}
.modal__box .title .tabs > div em {
font-style: normal;
}
.modal__box .title .tabs > div.active {
background-color: #1f224a;
}
.modal__box .title .tabs > div .favicon {
margin-right: 0.4rem;
margin-top: 0.2rem;
}
.modal__box .title .tabs > div .close {
margin-left: 5rem;
}
.modal__box .cont {
background-color: #282936;
height: 100%;
overflow-y: auto;
box-sizing: border-box;
border-bottom-left-radius: 0.5rem;
border-bottom-right-radius: 0.5rem;
}
.modal__box .cont > div {
display: none;
}
.modal__box .cont > div.active {
display: block;
height: 100%;
}
.modal__close {
position: absolute;
right: 20px;
top: 20px;
background-color: #1f224a;
padding: 1rem 1rem 0.8rem 1rem;
border-radius: 5px;
cursor: pointer;
transition: all 0.3s;
opacity: 0;
}
.modal__close:hover {
background-color: #292c61;
}
.modal__close svg {
color: #fff;
}
/* ๋ชจ๋ฌ ์ ๋๋ฉ์ด์
*/
/* animation: zoom 0s 0s ์์
ํ์ ๋ ์์ ์ ๋๋ฉ์ด์
์๊ฐ, ๋ค๋ ๋๋ ์ด ์๊ฐ */
.modal__cont.show {
/* ์ ์ฒด ๋ฐฐ๊ฒฝ */
animation: foldOut 1s ease forwards;
}
.modal__cont.show .modal__box {
/* ์คํฌ๋ฆฝํธ ๋ฐ์ค */
animation: zoomOut 0.5s 1s ease forwards;
}
.modal__cont.show .modal__close {
/* ๋ซ๊ธฐ ๋ฒํผ */
animation: opacityOut 0.5s 1.5s ease forwards;
}
.modal__cont.show.hide {
animation: foldIn 0.3s 0.5s ease backwards;
}
.modal__cont.show.hide .modal__box {
animation: zoomIn 0.5s ease forwards;
}
.modal__cont.show.hide .modal__close {
animation: opacityIn 0.5s ease forwards;
}
/* scaleX, scaleY : Line์ ๊ทธ๋ฆฌ๋ฉฐ ์ปค์ง๋ ์ ๋๋ฉ์ด์
*/
@keyframes foldOut {
0% {
transform: scaleX(0) scaleY(0.001);
}
50% {
transform: scaleX(1) scaleY(0.001);
}
100% {
transform: scaleX(1) scaleY(1);
}
}
@keyframes foldIn {
0% {
transform: scaleX(1) scaleY(1);
}
50% {
transform: scaleX(1) scaleY(0.001);
}
100% {
transform: scaleX(0) scaleY(0.001);
}
}
@keyframes zoomOut {
0% {
transform: scale(0);
}
100% {
transform: scale(1);
}
}
@keyframes zoomIn {
0% {
transform: scale(1);
}
100% {
transform: scale(0);
}
}
@keyframes opacityOut {
0% {
opacity: 0;
}
100% {
opacity: 1;
}
}
@keyframes opacityIn {
0% {
opacity: 1;
}
100% {
opacity: 0;
}
}
/* ๋ฏธ๋์ด์ฟผ๋ฆฌ */
@media (max-width: 1000px) {
.modal__box .title {
overflow: hidden;
}
.modal__box .title .dot {
display: none;
}
.modal__box .title .tabs {
margin-left: 0;
}
.modal__box .title .tabs .close {
display: none;
}
}
@media (max-width: 600px) {
#header {
text-align: center;
width: 100%;
}
#header h1 {
line-height: 1.4;
}
.madal__box {
width: 96%;
}
}
#2. JAVASCRIPT : ์คํฌ๋ฆฝํธ
! JAVASCRIPT TIP !
1. ๊ฒ์์ ์์๋ฅผ ๊ณ ๋ คํ์ฌ ๊ฐ ์ธ์
๋ณ๋ก ํจ์๋ฅผ ๋ง๋ค๋ฉด ์ฌํ์ฉ์ด ๊ฐ๋ฅํ์ฌ ํจ์ฌ ํธ๋ฆฌํ๊ฒ ๊ธฐ๋ฅ์ ๊ตฌํํ ์ ์์ต๋๋ค.
2. ์คํ๋ฌธ ์์ฑ์ ์ด๋ฒคํธ๋ฆฌ์ค๋๋ก ์์ฑํ๊ฒ ๋๋ฉด ํด๋น ์ด๋ฒคํธ๋ฅผ ์๋์ํฌ ๋ ์ง์ ํจ์๋ ํจ๊ป ์๋ํ๊ฒ ๋ฉ๋๋ค.
//cssProperty : ๋ฐ์ดํฐ ๊ฐ์ฒดํ ์ํค๊ธฐ
const cssProperty = [
{ num: 1, category: "etc", name: "accent-color", desc: " ์์์ ๊ฐ์กฐ ์์์ ์ง์ ํฉ๋๋ค. " },
{ num: 2, category: "flex", name: "align-content", desc: " ์ฝํ
์ธ ์ฌ์ด์ ์ฝํ
์ธ ์ฃผ์ ๋น ๊ณต๊ฐ์ ํ๋ ์ค ๋ฐ์ค์ ๊ต์ฐจ์ถ ๋๋ ๊ทธ๋ฆฌ๋์ ๋ธ๋ก ์ถ์ ๋ฐ๋ผ ๋ฐฐ์นํ๋ ๋ฐฉ์์ ๊ฒฐ์ ํฉ๋๋ค." },
{ num: 3, category: "flex", name: "align-items", desc: " ๊ต์ฐจ์ถ์์ ์์ดํ
์ ๋ ฌ ํ๋ ์์ฑ์
๋๋ค. ์ฃผ๋ก flex์์ item๋ค์ ์ ๋ ฌํ ๋ ์ฌ์ฉ๋ฉ๋๋ค." },
{ num: 4, category: "flex", name: "align-self", desc: " ํน์ item์ ์ ๋ ฌ์ ๋ฐ๋ก ํ๊ณ ์ถ์ ๋ ์ฌ์ฉํฉ๋๋ค." },
{ num: 5, category: "etc", name: "all", desc: " CSS ์ฌ์ฉ์ ์ง์ ์์ฑ์ ์ ์ธํ ๋ชจ๋ ์์ฑ์ ์ด๊ธฐํํฉ๋๋ค. ์ด๊น๊ฐ, ์์๊ฐ, ์๋๋ฉด ๋ค๋ฅธ ์คํ์ผ์ํธ ์ถ์ฒ์ ๊ฐ๋ก ์ค์ ํ ์ ์์ต๋๋ค." },
{ num: 6, category: "animation", name: "animation", desc: " ์ ๋๋ฉ์ด์
๊ณผ ๊ด๋ จ๋ ์์ฑ์ ์ผ๊ด์ ๋ก ์ฒ๋ฆฌํฉ๋๋ค." },
{ num: 7, category: "animation", name: "animation-delay", desc: " ์ ๋๋ฉ์ด์
์ง์ฐ ์๊ฐ์ ์ค์ ํฉ๋๋ค." },
{ num: 8, category: "animation", name: "animation-direction", desc: " ์ ๋๋ฉ์ด์
์์ง์ ๋ฐฉํฅ์ ์ค์ ํฉ๋๋ค." },
{ num: 9, category: "animation", name: "animation-duration", desc: " ์ ๋๋ฉ์ด์
์์ง์ธ ์๊ฐ์ ์ค์ ํฉ๋๋ค." },
{ num: 10, category: "animation", name: "animation-fill-mode", desc: " ์ ๋๋ฉ์ด์
์ด ๋๋ ํ์ ์ํ๋ฅผ ์ค์ ํฉ๋๋ค." },
.
.
.
{ num: 382, category: "etc", name: "z-index", desc: " ์๋ฆฌ๋จผํธ์ ๊ฒน์ณ์ง๋ ์์๋ฅผ ์ง์ ํ๋ค." }
];
//์ ํ์
const searchTime = document.querySelector(".time span");
const searchList = document.querySelector(".search__list");
const searchAnswers = document.querySelector(".search__answers");
const searchMissAnswers = document.querySelector(".search__missAnswers");
const searchStart = document.querySelector(".search__box .start");
const searchInput = document.querySelector("#search");
const searchAudio = document.querySelector("#audio");
const musicPlay = document.querySelector(".search__audio .play");
const musicStop = document.querySelector(".search__audio .stop");
const searchScoreNow = document.querySelector(".search__info .now");
const searchResult = document.querySelector(".search__result .result");
const searchResultWrap = document.querySelector(".search__result");
const searchRestart = document.querySelector(".search__result .restart");
let timeReamining = 120, // ๋จ์ ์๊ฐ
timeInterval = "",
score = 0, // ์ ์
answers = {}; // ์๋ก์ด ์ ๋ต
let total = cssProperty.length;
document.querySelector(".num").innerText = total;
function updateList(){
cssProperty.forEach(data => {
searchList.innerHTML += `<span>${data.name}</span>`;
})
}
updateList();
// ๊ฒ์ ์์ํ๊ธฐ
function startQuiz(){
// ์์ ๋ฒํผ ์จ๊ธฐ๊ธฐ
searchStart.style.display = "none";
searchList.style.display = "none";
// ์๊ฐ ์ค์ (1์ด์ ํ๋ฒ์ฉ ์ค์ด๋ฆ)
timeInterval = setInterval(reduceTime, 1000);
// ์์ฑ ๋ฆฌ์คํธ ์์ ๊ธฐ
// ์์
์ถ๊ฐ
music();
// ์ ์ ๊ณ์ฐ
let score = 0;
// ์ ๋ต ์ฒดํฌ
checkAnswers();
}
// ์์
์ฌ์
function music(){
musicStop.addEventListener("click", () => {
musicStop.style.display = "none";
musicPlay.style.display = "block";
searchAudio.pause();
});
musicPlay.addEventListener("click", () => {
musicPlay.style.display = "none";
musicStop.style.display = "block";
searchAudio.play();
});
searchAudio.play();
}
// ์ธํ ์ฒดํฌํ๊ธฐ
function checkInput(){
let input = event.currentTarget.value.trim().toLowerCase(); // ์ฌ์ฉ์๊ฐ ์
๋ ฅํ ๊ฐ ๊ฐ์ ธ์ค๊ธฐ
if(answers.hasOwnProperty(input) && !answers[input]){
answers[input] = true;
// ์ ๋ต ํ์
searchAnswers.style.display = "block";
searchAnswers.innerHTML += `<span>${input}</span>`;
// ์ ์ ๋ฐ์
score++;
searchScoreNow.innerText = score;
// ์ ๋ต ์ด๊ธฐํ
searchInput.value = "";
}
}
// ์ ๋ต ์ฒดํฌํ๊ธฐ : ์ ๋ต์ ๊ฐ์ฒด ํ์ผ๋ก ๋ง๋ค๊ธฐ
function checkAnswers() {
cssProperty.forEach(item => {
let answer = item.name.trim().toLocaleLowerCase();
answers[answer] = false;
});
}
// ์ค๋ต ๋ณด์ฌ์ฃผ๊ธฐ
function missAnswers(){
searchMissAnswers.style.display = "block";
cssProperty.forEach(item => {
let answer = item.name.trim().toLocaleLowerCase();
if(answers[answer] == false){
searchMissAnswers.innerHTML += `<span>${item.name}</span>`
}
})
}
// ์๊ฐ ์ค์ ํ๊ธฐ 0:00
function reduceTime(){
timeReamining--;
if(timeReamining == 0) endQuiz();
searchTime.innerText = displayTime();
}
// ์๊ฐ ํ์ํ๊ธฐ
function displayTime(){
if(timeReamining <= 0){
return "0:00";
} else {
let minutes = Math.floor(timeReamining / 60);
let seconds = timeReamining % 60;
// ์ด ๋จ์๊ฐ ํ์๋ฆฌ์์ผ ๋ 0 ์ถ๊ฐ
if(seconds < 10) seconds = "0" + seconds;
return minutes + ":" + seconds;
}
}
// ๊ฒ์์ด ๋๋ฌ์ ๋
function endQuiz(){
// ์์ ๋ฒํผ ๋ง๋ค๊ธฐ
searchStart.style.display = "block";
searchStart.style.pointerEvents = "none";
// ์ค๋ต ๋ณด์ฌ์ฃผ๊ธฐ
missAnswers();
// ์์
๋๊ธฐ
searchAudio.pause();
// ๋ฉ์์ง ์ถ๋ ฅ
searchResultWrap.classList.add("show");
let point = Math.round(score / cssProperty.length * 100);
searchResult.innerHTML = `๊ฒ์์ด ์ข
๋ฃ๋์์ต๋๋ค.<br>${cssProperty.length}๊ฐ ์ค ${score}๊ฐ๋ฅผ ๋งํ์ต๋๋ค.<br>์ ์๋ ${point}์ ์
๋๋ค.`;
//์๊ฐ์ ์ง
clearInterval(timeInterval);
}
//๋ค์ ์์ํ๊ธฐ - ๋ฆฌ์
function restart(){
setTimeout(() => {
searchResultWrap.classList.remove("show");
searchStart.style.display = "none"; // ๋ฒํผ ์จ๊น
searchStart.style.pointerEvents = "all";
searchList.style.display = "none";
//๋ค์ ์์ํ ๋ ๊ธฐ์กด ๋ฐ์ดํฐ ์ด๊ธฐํ
searchAnswers.innerHTML= "";
searchMissAnswers.innerHTML= "";
startQuiz();
timeReamining = 120; // ์๊ฐ
score = 0;
searchScoreNow.innerText = 0;
}, 1000)
}
// ๋ฒํผ ์ด๋ฒคํธ
searchStart.addEventListener("click", startQuiz); // ๊ฒ์ ์์
searchInput.addEventListener("input", checkInput);
searchRestart.addEventListener("click", restart);
#3. ๊ฒฐ๊ณผ
728x90
๋๊ธ