0
.call-icon{
    height: 10vw;
    width: 10vw;
    box-shadow: white 0 0 5px;
    position: relative;
    
    
}
.call-icon:before{
    content: " ";
    top:0;
    position: absolute;
    height: 12vw;
    width: 12vw;
  
    background-color: red;
    filter: blur(50px);
    
    z-index: -2;
}

The pseudo element is not displaying while using abosolute positioning. I tried without positionings it dosent work either.

1 Answer 1

0

Can you please delete z-index: -2 or set it z-index: 0 or if you going to use z-index for another thing u can change your body element background-color property to background-color: transparent

.container{
  background-color: transparent;
  height: 100vh;
  display:grid;
  place-content: center;
}

.call-icon{
  height: 10vw;
  width: 10vw;
  box-shadow: white 0 0 5px;
  position: relative;
}

.call-icon:before{
  content: " ";
  top:0;
  position: absolute;
  height: 12vw;
  width: 12vw;

  background-color: red;
  filter: blur(50px);
  z-index: -2;
}
<div class="container">
      <div class="call-icon"></div>
</div>

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.