<section id="transition-on-hover" class="animate-things-wrapper">
    <div id="box" class="box">
        Hi there
    </div>
</section>

<script src="../../js/components/transition-on-hover.js"></script>
<section id="transition-on-hover" class="animate-things-wrapper">
    <div id="box" class="box">
        Hi there
    </div>
</section>

<script src="{{ path '/js/components/transition-on-hover.js' }}"></script>
/* No context defined. */
  • Content:
    (function () {
      document.addEventListener('DOMContentLoaded', function () {
        console.log("transition-on-hover active");
    
        const button = document.querySelector('#trigger');
        const box = document.querySelector('#box');
    
        button.addEventListener('click', function() {
          box.classList.add('active');
        })
      });
    })();
    
  • URL: /components/raw/transition-on-hover/transition-on-hover.js
  • Filesystem Path: components/01-basic/14-transition-on-hover/transition-on-hover.js
  • Size: 333 Bytes
  • Content:
    #transition-on-hover {
      .box {
        width: 200px;
        height: 200px;
        transform: scale(1, 1) rotate(0);
        transition: all 0.25s ease;
        background-color: #8df5c6;
    
        &:hover {
          transition: transform 0.75s ease-out, background-color 1s ease-in, color 0.375s ease-in, border-radius 0.9s ease-out;
          cursor: pointer;
          transform: scale(1.25, 1.25) rotate(-45deg);
          background-color: #047644;
          color: #fff;
          border-radius: 45px;
        }
      }
    }
    
  • URL: /components/raw/transition-on-hover/transition-on-hover.scss
  • Filesystem Path: components/01-basic/14-transition-on-hover/transition-on-hover.scss
  • Size: 474 Bytes
  • Handle: @transition-on-hover
  • Preview:
  • Filesystem Path: components/01-basic/14-transition-on-hover/transition-on-hover.hbs

No notes defined.