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

299
Vistas
How to use dataURL to save div image With drop-shadow outline? (codepen link in cmt)

I want to use toDataURL to download specific div image

 <div class="webtoonImage">
    </div> <!--side display webtoon-->

But because my div have filter drop-shadow as an outline border. So that why the toDataURL didn't capture it.

.container {
  display: grid;
  filter: drop-shadow(1px 0px 0px black) 
    drop-shadow(-1px 0px 0px black)
    drop-shadow(0px 1px 0px black) 
    drop-shadow(0px -1px 0px black)
    drop-shadow(1px 1px 0px black);
}

I was wonder is it possible to save the image with the drop-shadow outline border?

Here is the video link of the problems: video link demonstate problem

Explain problme in image form: When I click download button: clicking download button

This is how the image div is downloaded download image no border

There is no border outline , the dataURL didn't capture the drop-shadow outline border downlaod image no border outline quesiton mark

The drop-shadow is at the .container class width drop-shadow outline clip path balloon

This is when I turn off the drop-shadow no drop-shadow

Here is the toDataURL function to donwload the .div .webtoonImage:

function downloadWebtoonDesktop() {
    html2canvas(document.querySelector(".webtoonImage")).then(function(canvas) {
        // document.body.appendChild(canvas);
        console.log("hello")
        var dataURL = canvas.toDataURL("image/png");
        let downloadLink = document.createElement('a');
      downloadLink.setAttribute('download', 'DiamondWebtoonLayout-Episode-.png');
      let url = dataURL.replace(/^data:image\/png/,'data:application/octet-stream');
      downloadLink.setAttribute('href', url);
      downloadLink.click();
        // document.querySelector("#theimage9").src = theimage9; 
    });
}

[UNSOLVED] codepen link

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