为了账号安全,请及时绑定邮箱和手机立即绑定

如何用jquery控制frameset中的iframe实现淡入淡出的效果

如何用jquery控制frameset中的iframe实现淡入淡出的效果

动漫人物 2019-05-13 08:08:48
如何用jquery控制frameset中的iframe实现淡入淡出的效果
查看完整描述

2 回答

?
森栏

TA贡献1810条经验 获得超5个赞

有很多种方式可以实现。
1、$(iframeId).toggle(2000); //2秒
2、$(iframeId).fadeOut(2000);
$(iframeId).fadeIn(2000);
3、 $(iframeId).slideDown(2000);
$(iframeId).slideUp(2000)
4、 $(iframeId).slideToggle(2000)




查看完整回答
反对 回复 2019-05-14
?
慕斯王

TA贡献1864条经验 获得超2个赞

Jquery弹出层窗口,并且背景变暗
先到 下载Jquery的Lee dialog插件,
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
<script language="javascript" src="dialog.js"></script>
<script language="javascript" src="Jquery.js"></script>
<style>
#floatBoxBg
.floatBox
.floatBox .title
.floatBox .title h4
.floatBox .title span
.floatBox .content
</style>
</head>

<body>
<script>
function aa()
{
dialog("我的标题","iframe:login.php","500px","auto","text"); // login.php 为要弹出的窗口
}

</script>
<a href="#" onclick="aa()" >Click Here</a>
</body>
</html>

关于这个dialog插件的其它用法:
get加载一个.html文件(也可以是.php/.asp?id=4之类的)
dialog("我的标题","test.html","200px","auto","text");

弹出纯文本内容
dialog("我的标题","text:我的内容","200px","auto","text"); 试试
弹出某id里面的html
页面有<div id="testID" style="display:none;"><h2>Lee dialog</h2></div>
dialog("我的标题","id:testID","300px","auto","id"); 试试
Lee dialog
加载一个页面以框架示
把blueidea加载进来,定义css:body .iframe .content复盖一下,因为.content默认padding:20px;
dialog("blueidea","iframe:","500px","500px","iframe");




查看完整回答
反对 回复 2019-05-14
  • 2 回答
  • 0 关注
  • 760 浏览

添加回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信