glowing buttons

Notes

.container a::after {
    
    position: absolute;         /* โญ๏ธ ไฝฟ็”จ็ต•ๅฐไฝ็ฝฎ */
    inset: 0;                   /* โญ๏ธ ่ฆ†่“‹ๆ•ดๅ€‹ <a> */

    content: '';                /* โญ๏ธ ๆฒ’ๆœ‰ๅ…งๅฎน๏ผŒ่ƒŒๆ™ฏ่‰ฒๆœƒไธ่ฆ‹โ—๏ธ */
    background: linear-gradient(45deg, rgb(130, 204, 253), rgb(2, 2, 128), #003, rgb(255, 100, 95));
    transition: 0.5s;           /*  */
}

.container a:hover::after {
    
    /* โญ๏ธ glow effect */
    inset: -3px;
    filter: blur(10px);
}
  • ไฝฟ็”จ ::after ไพ†่ฃฝ้€  <a> ๅ…ƒ็ด ใ€Œ่ƒŒๅ…‰ใ€็š„ๆ•ˆๆžœใ€‚

  • ๅˆฉ็”จ background: linear-gradient ่ฃฝไฝœใ€Œๅฝฉ่‰ฒ็š„ๅนป็‡ˆใ€ๆ•ˆๆžœใ€‚

  • ๅˆฉ็”จ transition ็”ข็จฑใ€Œๅ‹•็•ซใ€ๆ•ˆๆžœใ€‚

  • ๅˆฉ็”จ :hover ่ˆ‡ inset: -3px, filter: blur() ่ฃฝ้€ ใ€Œๆบขๅ…‰ใ€ๆ•ˆๆžœใ€‚

Code

Last updated