2014-12-11 52 views
-1

我在我的網頁上有3幀,我需要一種方法來增加懸停事件上的幀大小,我該怎麼做? 這裏是我的代碼:我需要一種方法來增加懸停事件上的幀大小

<html> 
<style ="text/css"> </style> 
<frameset cols="33.3%,33.3%,33.3%"> 
<frame src="enter.html"> <frame src="prod.html"> 
<frame src="game.html"> </frameset> 
+0

<風格= 「文本/ CSS」> – 2014-12-11 04:41:26

+1

僅供參考..框架集不在支持HTML5 .. – 2014-12-11 05:10:57

+0

http://stackoverflow.com/questions/11271764/how-to-change-dynamically -frame-size-on-mouse-over – 2014-12-11 05:32:26

回答

0

你可以嘗試這樣的:

HTML

<frameset id="1" cols="33.3%,33.3%,*"> 
    <frame src="page1.html" onmouseover="big()" onmouseout="small()"></frame> 
    <frame src="page2.html" onmouseover="big()" onmouseout="small()"></frame> 
    <frame src="page3.html" onmouseover="big()" onmouseout="small()"></frame> 
</frameset> 

的JavaScript第1頁

var e = document.getElementById("myframeset"); 
function big(){ 
e.setAttribute("cols","60%,20%,*") 
} 
function small(){ 
e.setAttribute("cols","33.3%,33.3%,*") 
} 

注意:您不會將JavaScript代碼放在包含框架集的頁面中。 JavaScript代碼應該相應放置在page1,page2和page3中。

+0

Thankyou男人它爲我工作! – 2014-12-11 07:58:48

+0

@ParthVerma你可以接受答案,如果它的工作.. – 2014-12-11 09:15:28

+0

我試過用我的代碼,但它不工作。查看https://onedrive.live.com/redir?resid=FE2C9022D00ED02E%21954 – 2014-12-12 07:43:12

0

試試這個http://jsfiddle.net/9vsr0ybx/

iframe{ 
width:400px; 
height:400px; 
} 

iframe:hover{ 
width:500px; 
height:500px; 
} 
+0

我可以使用frame而不是i frame嗎? – 2014-12-11 04:54:00

+0

@ParthVerma你可以用框架顯示工作小提琴嗎? – Akshay 2014-12-11 05:06:49

+0

@ParthVerma使用iframes更好一點 – Akshay 2014-12-11 05:08:30

相關問題