我有一个HTML页面iframe.我想改变iframe内容的样式,但我似乎无法这样做.
我想将所有内容的字体更改iframe为"Tahoma".这是我的代码:
<!DOCTYPE>
<html>
<head>
<title>phpinfo()</title>
<style type="text/css">
#outerdiv
{
width:446px;
height:246px;
overflow:hidden;
position:relative;
}
#inneriframe
{
position:absolute;
top: -508px;
left: 0px;
width: 100%;
height: 615px;
font-family: Tahoma;
}
</style>
<script>
onload = function()
{
document.frm.document.body.style.fontFamily = "Tahoma";
}
</script>
</head>
<body>
<div id='outerdiv '>
<iframe name="iframe" src="http://m.sarafikish.com" id='inneriframe' name="frm" scrolling=no frameborder="0" > </iframe>
</div>
</body></html>
Run Code Online (Sandbox Code Playgroud)