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

114
Visualizações
Disable or overlay link inside Iframe

var iframe = document.querySelector('#iframe');
iframe.setAttribute('src', 'https://datastudio.google.com/embed/reporting/20db63b8-999b-4f26-8819-b3f11e034535/page/VgD');
iframe {
  width: 400px;
  height: 400px;
  resize: both;
  /* pointer-events: none; */
}
<html>
 <body>
  <iframe id="iframe" src=""></iframe>
  <script src="main.js"></script>
 </body>
</html>

How to hide URL and make it unable to open this report from iframe dialog. Is it possible to hide or overlay with dev particular button("Google Studio danych") and make it unclickable?

Please check here: https://jsfiddle.net/k53p2xdb/ Image

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

0

I'm not sure you can write CSS for inside of iframe, but i find a workaround for you.

Wrap your iframe in a container and create black overlay outside of iframe, I just update the changes in below code snippet. I hope it'll help you out. Thank You

enter image description here

var iframe = document.querySelector('#iframe'); 
iframe.setAttribute('src', 'https://datastudio.google.com/embed/reporting/20db63b8-999b-4f26-8819-b3f11e034535/page/VgD');
.parent {
  position: relative;
  height: 400px; 
  width: 400px; 
}

.overlay {
  background-color: black;
  position: absolute;
  bottom: 0;
  left: 0;
  height: 24px;
  width: 100%
}


iframe { 
  height: 100%;
  resize: both;
  width: 100%;
} 
<html> 
  <body> 
    <div class="parent">
      <iframe id="iframe" src=""></iframe>
      <div class="overlay"></div>
    </div>
      <script src="main.js"></script> 
    </body> 
</html> 

about 4 years ago · Juan Pablo Isaza Relatório

0

I'm not sure, but you can try it => https://www.w3schools.com/howto/tryit.asp?filename=tryhow_js_element_iframe

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