HazelÀº ÀÏÁ¤ ½Ã°£ ÈÄ¿¡ ÀÚµ¿À¸·Î »ç¶óÁö´Â °íÁ¤µÈ Å佺Ʈ ¸ð¾çÀÇ ¾Ë¸² Æ˾÷ À» ¸¸µå´Â ¾ÆÁÖ ÀÛÀº jQuery Ç÷¯±×ÀÎÀÔ´Ï´Ù .
±âº», ¼º°ø, ¾îµÓ°í, À§ÇèÇÏ°í, °æ°íÀÇ 5°¡Áö ±âº» Å׸¶°¡ Á¦°øµË´Ï´Ù. ±âÁ¸ Å׸¶¸¦ »ç¿ëÀÚ ÁöÁ¤Çϰųª ³ª¸¸ÀÇ Å׸¶¸¦ Ãß°¡ÇÒ ¼öµµ ÀÖ¾î ¾Ë¸²ÀÌ ¾î¶»°Ô º¸ÀÌ´ÂÁö¿¡ À¯¿¬¼ºÀ» Á¦°øÇÕ´Ï´Ù.
# ÀåÁ¡
CSS°¡ JavaScript ÆÄÀÏ ÀÚü¿¡ Æ÷ÇԵǾî ÀÖ´Ù´Â °ÍÀÔ´Ï´Ù.
Áï, º°µµÀÇ ½ºÅ¸ÀÏ ½ÃÆ®¸¦ Æ÷ÇÔÇÒ ÇÊ¿ä°¡ ¾øÀ¸¹Ç·Î ¸ðµç °ÍÀÌ ±ò²ûÇÏ°Ô À¯ÁöµË´Ï´Ù.
# ¶óÀ̼¾½º
MIT ¶óÀ̼¾½º
# »ç¿ë¹æ¹ý
1. ¶óÀ̺귯¸® È£Ãâ
<script src="https://code.jquery.com/jquery-3.7.0.min.js"></script>
<script src="hazel.js"></script>
2. CSS Àû¿ë
<style>
html,* { font-family: 'Inter'; box-sizing: border-box; }
body { background-color: #f0efea; line-height:1.6;}
.lead { font-size: 1.5rem;
font-weight: 300;
background: linear-gradient(to right, #000000 0%, #000000 50%,#999999 100%);
-webkit-background-clip: text;
-webkit-text-fill-color:transparent;
}
.container { margin: 150px auto; max-width: 960px; text-align: center; }
h1 {
background: linear-gradient( 120deg, #bd34fe 30%, #41d1ff );
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
}
button {
padding: .75rem 1.25rem;
border: 0;
margin: 20px auto;
border-radius: 20px;
background-color: #222;
color: #fff;
cursor: pointer;
}
</style>
<style>
.download{
padding: 1.25rem;
border:0;
border-radius:3px;
background-color:#4F46E5;
color:#fff;
cursor:pointer;
text-decoration:none;
}
.download:hover{color: #fff}
#carbonads{display:block;overflow:hidden;max-width:728px;position:relative;font-size:22px;box-sizing:content-box}
#carbonads>span{display:block}
#carbonads a{color:#4F46E5;text-decoration:none}
#carbonads a:hover{color:#4F46E5}
.carbon-wrap{display:flex;align-items:center}
.carbon-img{display:block;margin:0;line-height:1}
.carbon-img img{display:block;height:90px;width:auto}
.carbon-text{display:block;padding:0 1em;line-height:1.35;text-align:left}
.carbon-poweredby{
display:block;
position:absolute;
bottom:0;
right:0;
padding:6px 10px;
text-align:center;
text-transform:uppercase;
letter-spacing:.5px;
font-weight:600;
font-size:8px;
border-top-left-radius:4px;
line-height:1;
color:#aaa!important
}
@media only screen and (min-width:320px) and (max-width:759px){.carbon-text{font-size:14px}}
</style>
3. À̺¥Æ®¸¦ °É¾î¼ ÁöÁ¤ÇÏ¸é µË´Ï´Ù.
$('#primary').on('click', function(){
$(this).hazel('This is a primary notification', 'primary', 3000);
})
# ½ÇÇà ȸé