Hiệu ứng khi di chuyển chuột vào chữ với CSS

▶ Preview

Để có hiệu ứng như trên, bạn làm theo hướng dẫn sau :

Thêm CSS

Bạn tìm đến thẻ đóng ]]></b:skin> và dán đoạn CSS sau đây vào trước nó.
h1::before {  
  transform: scaleX(0);
  transform-origin: bottom right;
}

h1:hover::before {
  transform: scaleX(1);
  transform-origin: bottom left;
}

h1::before {
  content: " ";
  display: block;
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;
  inset: 0 0 0 0;
  background: green;
  z-index: -1;
  transition: transform .3s ease;
}

h1 {
  position: relative;
  font-size: 3rem;
}

html {
  block-size: 50%;
  inline-size: 50%;
}

body {
  min-block-size: 50%;
  min-inline-size: 50%;
  margin: 0;
  box-sizing: border-box;
  display: grid;
  place-content: center;
  font-family: system-ui, sans-serif;
}

@media (orientation: landscape) {
  body {
    grid-auto-flow: column;
  }
}
Bạn có thể thay đổi background, font-size,... theo ý bạn.
Sau đó nhấn 💾 để Lưu lại.
Cuối cùng bạn thêm các Header để có hiệu ứng như trên.
<h1>Hover Me</h1>

Chúc bạn thành công!