我试图使 iframe 从链接(链接是中心点)逐渐增长。它将成为链接的大小,然后增长到 iframe 的大小。会有其他链接,因此它们将具有相同的效果。有任何想法吗?对不起,我是新手
<html>
<head>
<link rel="stylesheet" href="Css/style.css" type="text/css" media="screen" />
<script language="JavaScript" type="text/javascript">
function makeFrame(src) {
ifrm = document.createElement("IFRAME");
ifrm.setAttribute("onmouseout","closeFrame()")
ifrm.setAttribute("src","");
ifrm.style.display = "block";
ifrm.style.width = "640px";
ifrm.style.height = "400px";
ifrm.style.marginLeft = "325px";
ifrm.style.marginTop = "125px";
ifrm.style.position = "absolute";
ifrm.style.top="0px";
ifrm.style.color="red";
ifrm.style.zIndex= "101";
document.body.appendChild(ifrm);
}
function closeFrame(){
ifrm.style.display = "none";
}
</script>
</head>
<body>
<img src="" onclick=makeFrame() height="100px" width="100px" />
</body>
</html>