Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

249
Visualizações
How to blur background of webpage and make it not interactable in certain areas?

I'm basically trying to implement a popup that blurs the background and makes it so that the user can't touch the buttons and other components in the background.

about 4 years ago · Juan Pablo Isaza
3 Respostas
Responde à pergunta

0

You can disable the whole div by using css.

#div-id{
  pointer-events: none;
}

This will disable all the elements inside the div. If you want the blur effect you can add opacity: 0.2; to the div css.

about 4 years ago · Juan Pablo Isaza Relatório

0

You can add this class on your main element container to blur the whole background

.blured {
  filter: blur(2px);
  -webkit-filter: blur(2px);
}

And add pointer-events: none; on your modal or popup

about 4 years ago · Juan Pablo Isaza Relatório

0

By using css backdrop-filter property and pointer-events you can achieve what u need .. see example below

 
    * {
        box-sizing: border-box;
        font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
        font-size: 1rem;
    }

    body {
        margin: 0;
        padding: 0;
    }
    .disabled{
     pointer-events: none;
     color : grey;
    }

    .modal {
        position: fixed;
        inset: 0;
        isolation: isolate;
        background-color: rgba(19, 128, 119, 0.5);
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .popup {
        position: absolute;
        z-index: 1;
        width: 400px;
        background-color: black;
        color: white;
        padding: 1rem;
    }
    .blur{
        position: absolute;
        inset: 0;
        z-index: -1;
        backdrop-filter: blur(0.2rem);
    }
  
<div class="text">
    Lorem ipsum dolor sit amet, consectetur adipisicing elit. Aliquid dolorum illo, non incidunt earum natus neque architecto a autem maxime voluptatibus tempora minima, provident expedita quidem cumque ab. Error, tenetur?
</div>
<div class="modal">
    <div class="blur"></div>
    <div class="popup">
        Lorem ipsum dolor sit amet consectetur adipisicing elit. Animi quam architecto minima nihil aliquid quis unde
        illo mollitia iure. Quia.
        <br /> <br /> <br />
        <a href="#" class="disabled">
            I am a disabled link !
        </a>
    </div>
</div>

References : pointer-events and backdrop-filter.

Note: Also remember using pointer events doesn't means you can't use keyboard to focus.. To prevent keyboard tab focus you might need to use tabindex attribute on the link

about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda