JSFiddle - React, Tailwind, and code Playground

by Dominik Wilk

HTML

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Document</title>
</head>
<body>
  <button>test</button>
</body>
</html>

SCSS

button {
  margin: 100px;
  position: relative;
  z-index: 2;
  
  &:hover:before {
    content: '';
    position: absolute;
    top: -50px;
    left: -50px;
    right: -50px;
    bottom: -50px;
    background: #fff; 
    opacity: 0.1;
    z-index: 2;
    border-radius: 50%;
  }
  
  &:hover:after {
    content: 'Kliknij aby zobaczyć jego produkty';
    position: absolute;
    top: -50px;
    left: -50px;
    right: -50px;
    bottom: -50px;
    background: yellow; 
    opacity: 0.9;
    z-index: 2;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
  }
}

body {
  &:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    opacity: 0.8;
    z-index: 1;
  }
}