由于工作需要,两个iframe需要并排横着显示:

效果如下:

iframe并排横着显示

 

代码如下:

<!DOCTYPE html>
<html lang="zh">
<head>
<meta name='viewport' content='initial-scale = 1, minimum-scale = 1, maximum-scale = 1'/>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="x-ua-compatible" content="IE=10">
<title></title>


 </head>
<body onload="abc();">
<iframe width="20%" height="500px" src="/courseware-tool/jsp/mainTree.jsp" name="contentIFrame" frameborder="0" scrolling="yes" style="float: left;"></iframe>
<iframe width="80%" height="500px" src="${uploadPath }" name="contentIFrame" ,function(a,b,c,d){
                            alert(7);
                            });
        clearInterval(timer);
    }
}
</script>
</html>

重点是:iframe的代码,要想横着显示

加上:style="float: right;"即可。

相关文章: