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

193
Vistas
How to place Glass over the rock?

I am trying to responsive the glass with rock using some custom javascript and TailwindCss. I need to place the glass over the rock on all breakpoints.

Glass should be place like this: enter image description here

Code:

 <!DOCTYPE html>
    <html lang="en">
    <head>
        <meta charset="UTF-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <script src="https://cdn.tailwindcss.com"></script>
    </head>
    
        <body>       
            <div>
                <div class="text-center relative">
                    <div class="mx-auto w-48 h-auto mb-2 relative mb-4 shadow-inset ">
                        <img src="https://i.ibb.co/qjqqmQ0/glass-7-web-removebg-preview-2.png" class="glass_icon object-cover w-full h-96" alt="">
                    </div>
                </div>
            </div>
        </body>
        <script>
            const body = document.querySelector("body");
            body.style.background = `url('https://harvest-selection.netlify.app/assets/background/In-Woods.gif') no-repeat fixed 50% 100%`;
    
            body.style.cssText += `background-size: cover;height:100vh`;
        </script>
    </html>
about 4 years ago · Juan Pablo Isaza
2 Respuestas
Responde la pregunta

0

I don't know if I understood it correctly. Do you think so?

body {
  width: 100vw;
  height: auto;
  position: relative;
  margin: 0 auto;
}
body > img {
  width: 100%;
  height: auto;
}

.overlay {
  position: absolute;
  top: 0; 
  bottom: 0;
  left: 0;
  right: 0;
  background: url(https://i.ibb.co/qjqqmQ0/glass-7-web-removebg-preview-2.png) no-repeat center/40%;
  display: inline-block;
}
<body>
  <div class="overlay"></div>
  <img src="https://harvest-selection.netlify.app/assets/background/In-Woods.gif">
</body>

about 4 years ago · Juan Pablo Isaza Denunciar

0

 .glass{
  background: url("https://i.ibb.co/qjqqmQ0/glass-7-web-removebg-preview-2.png") 43% 180px no-repeat, url("https://harvest-selection.netlify.app/assets/background/In-Woods.gif") left top no-repeat;
  padding: 15px;
  background-size: 100px, 100%;
height: 400px;
}
     <div>
       <div class="text-center relative">
         <div class="glass">
         </div>
       </div>
    </div>

about 4 years ago · Juan Pablo Isaza 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