<script setup lang="ts"></script> <template> <div class="content fit center"> <button class="btn">Hover To See Magic</button> </div> </template> <style lang="scss" scoped> @keyframes glow { from { background-position: 0%; } to { background-position: 260%; } } .content { font-family: 'Arial', sans-serif; background-color: #100f13; } button { margin: 0; padding: 0; border: 0; outline: 0; box-sizing: border-box; } .btn { cursor: pointer; position: relative; padding: 10px 18px; font-size: 16px; text-transform: uppercase; color: #ffffff; background-color: rgba(255, 255, 255, 0.1); border: 3px solid rgba(255, 255, 255, 0.2); border-radius: 10px; transition: 0.4s; &:hover { z-index: 1; border-color: transparent; background: linear-gradient( 90deg, #fbb454, #f7ec09, #3ec70b, #3b44f6, #a149fa, #fbb454 ); background-size: 260%; box-shadow: 0 0 15px rgb(2, 4, 24); animation: glow 8s linear forwards; &::before { opacity: 1; z-index: -1; } } &::before { content: ''; position: absolute; top: -1px; left: -1px; right: -1px; bottom: -1px; background: inherit; filter: blur(26px); opacity: 0; transition: 0.4s ease-out; } } </style>