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

250
Visualizações
How can I make background half visible when I press the button?

How can I make half of the screen partially black when I click on button, like on the picture :

mobile

I made mobile navigation like that and specified that background color should be white:

.nav-links-row-mobile{
    display: none;
    top:0;
    position: absolute;
    left:0;
    list-style: none;
    background-color: #ffffff;
    margin: 0;
    padding: 50px;
    height: 100%;
}
 <div class="nav-links ">
                    
                    <ul class="nav-links-row-mobile">
                        <div class="nav-logo nav-logo-mobile">
                            <a href="index.html">
                            <h1>Brit</h1><span class="grey">lex</span>
                        </a>
                        </div>
                        <li><a href="#!">Home</a></li>
                        <li><a href="#!">Skills</a></li>
                        <li><a href="#!">About Us</a></li>
                        <li><a href="#!">Pricing</a></li>
                        <li><a href="#!">Contacts</a></li>
                    </ul>
                </div>

But how can I make 2nd half of the screen half black or partially visible?

Thank you in advance!

about 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

Try giving it a box-shadow with a zero blur, a very large spread and use rgba() to make the shadow color transparent.

body {
  width: 100%;
  height: 100%;
  background: url(https://www.fillmurray.com/800/600) no-repeat center center fixed;
  background-size: cover;
}

.nav-links-row-mobile{
  top:0;
  position: absolute;
  left:0;
  list-style: none;
  background: #ffffff;
  margin: 0;
  padding: 50px;
  height: 100%;
  box-shadow: 0 0 0px 5000px rgba(0,0,0,0.5);
}
<body>
<div class="nav-links">    
    <ul class="nav-links-row-mobile">
        <div class="nav-logo nav-logo-mobile">
            <a href="index.html">
            <h1>Brit</h1><span class="grey">lex</span>
        </a>
        </div>
        <li><a href="#!">Home</a></li>
        <li><a href="#!">Skills</a></li>
        <li><a href="#!">About Us</a></li>
        <li><a href="#!">Pricing</a></li>
        <li><a href="#!">Contacts</a></li>
    </ul>
</div>
</body>

about 4 years ago · Santiago Trujillo 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