H5 前端 如何修改iframe 内置网页的样式
调用iframe load 的方法
loadFrame(){let pdf = document.querySelector(‘#pdf iframe’).contentDocument
contentDocument 也可为contentWindow
个人认为主要是看是内置是html 还是文件
let body = pdf.queryselector(‘body’)
let title = body.queryselector(‘.header’)
title.style.display = ‘none’
let content = body.querySelector(‘#outercontainer’)
content.style.marginTop=-53px
body.style.backgroundcolor=’white
body.style.backgroundImage=’none
//body.style.removeProperty(‘background-image’)console.log(pdf,body,title,content,’—-0000000′);