Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

244
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda