【CSS】Technique to add a frame line to text using text-stroke when hovering | Demo page

※Please check using Developer tools

DUMMEY TEXT

Commentary

Sponsored links

CSS

body {
  background: #000;
}

.block {
  margin: 70px 0 0;
  text-align: center;
}

.block p {
  display: inline-block;
  color: #fff;
  text-align: center;
  font-size: 70px;
  font-weight: bold;
  transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
  cursor: pointer;
}

.block p:hover {
  color: transparent;
  -webkit-text-stroke: 1px #fff;
  transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

@media screen and (max-width:640px){
  .block p {
    font-size: 30px;
  }
}