我有iframe頁面,當你懸停時出現。我想改變這個點擊。不知何故,它不工作。Mouseenter&Mouseleave點擊
JS:
$('section div').mouseenter(function(){
$(this).css('height', '80vh');
$(this).css('width', '100%');
$('#info').css('width', '100%');
});
$('section div').mouseleave(function(){
$(this).css('height', '2.5vh');
$(this).css('width', '100%');
$('#info').css('width', '100%');
});
CSS:
iframe {
border: 0;
width: 100%;
height: 100%;
transition: 1s;
z-index: 2000;
}
#info {
position: fixed;
top: 0;
height: 80vh;
width: 100%;
transition: 1s;
z-index: 1;
}
section {
position: fixed;
bottom: 0;
width: 100%;
z-index: 2000;
}
HTML:
<body>
<section></section>
</body>
有時我試用制定出來,但僅在IFRAME本身(空白),因此沒有任何反應當iframe充滿內容時,也許這只是一個目標問題。
哪裏是你的'click'代碼? – Xufox
我所做的點擊代碼根本不起作用。這是我想要實現的點擊,而不是鼠標和鼠標滑輪:jsfiddle.net/T73A/tsq8h6pc – 73A
非工作代碼需要在問題本身。 – Xufox