即时通讯尝试使iframe逐渐增长onclick从链接(链接是中心点)。它将成为链接的大小,然后增长到iframe的大小。会有其他的链接,所以他们会有相同的效果。有任何想法吗?对不起,我是一个新手逐渐增长的iframe onclick
<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>
BTW - 640+“px”; - 使用“640px”非常好。 –
此外,利润也需要单位。 –
哦好吧非常感谢,现在改变了 – user1646537