Click Me ¹öÆ°À» Ŭ¸¯ÇÏ¸é º°, »ç°¢Çü µî ´Ù¾çÇÑ ÇüÅÂÀÇ ÆÄƼŬÀÌ Ãâ·ÂµË´Ï´Ù.
[ÆÄƼŬ html]
<div class="btn-particles"></div>
[ÆÄƼŬ css]
.btn-particles {
width: 100px;
height: 100px;
position: absolute;
border-radius: 50%;
color: #eee;
font-family: monospace;
z-index: 5;
}
[ÆÄƼŬ js Áß ¾ÆÀÌÄÜ ºÎºÐ]
var shapes = [
'<polygon class="star" points="21,0,28.053423027509677,11.29179606750063,40.97218684219823,14.510643118126104,32.412678195541844,24.70820393249937,33.34349029814194,37.989356881873896,21,33,8.656509701858067,37.989356881873896,9.587321804458158,24.70820393249937,1.0278131578017735,14.510643118126108,13.94657697249032,11.291796067500632"></polygon>',
// '<path class="circle" d="m 20 1 a 1 1 0 0 0 0 25 a 1 1 0 0 0 0 -25"></path>',
'<polygon class="other-star" points="18,0,22.242640687119284,13.757359312880714,36,18,22.242640687119284,22.242640687119284,18.000000000000004,36,13.757359312880716,22.242640687119284,0,18.000000000000004,13.757359312880714,13.757359312880716"></polygon>',
'<polygon class="diamond" points="18,0,27.192388155425117,8.80761184457488,36,18,27.19238815542512,27.192388155425117,18.000000000000004,36,8.807611844574883,27.19238815542512,0,18.000000000000004,8.80761184457488,8.807611844574884"></polygon>'];
À§ html°ú css·Î ÆÄƼŬ ¿µ¿ªÀÌ »ý¼ºµÇ¸ç,
js¼Ò½º·Î ÇØ´ç ¿µ¿ª¾È¿¡ svg ¾ÆÀÌÄܵéÀ» »ý¼ºµÇ¾î »Ñ·ÁÁö°í ÀÖ½À´Ï´Ù.
ÀÚ¼¼ÇÑ ¼Ò½º´Â ȨÆäÀÌÁö¿¡¼ È®ÀÎÇغ¸½Ç ¼ö ÀÖ½À´Ï´Ù. ^^
|