- jQuery 变动图片、滤镜效果
- jQuery javaScript js 判断浏览器的类型、版本的方法
- jQuery 设置表格隔行变色、隔列变色
- jQuery 可编辑表格文本域,支持键盘快捷操作
- jQuery 中常用的插件列表
- 共享你的 jquery 插件
- extJS checkBoxColunmTree 可以选择带 checkBox 的树(tree、grid)
- jquery tab 选项卡功能
- jQuery autocomplete 自扩展插件、自动补全示例
- jquery blockUI 扩展插件 Dialog
- jQuery 获取屏幕高度、宽度
- JavaScript/jQuery、HTML、CSS 构建 Web IM 远程及时聊天通信程序
- Web 通信 之 长连接、长轮询(long polling)
文章来源于网络收集而来,版权归原创者所有,如有侵权请及时联系!
jQuery 变动图片、滤镜效果
用 jQuery 写的简单的图片变化且带 alpha 滤镜的动态效果
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Alpha.html</title>
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="this is my page">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<mce:script type="text/javascript" src="extjs/adapter/jquery/jquery.js" mce_src="extjs/adapter/jquery/jquery.js"></mce:script>
<mce:script type="text/javascript">
<!--
var ary = ["red", "blue", "#CCFFFF", "#99FFCC"];
var imgAry = new Array();
imgAry.push("http://hiphotos.baidu.com/%BA%EC%C2%A5%C7%E9%C3%CE/pic/item/ed9e7094af4f2677d1135e93.jpg");
imgAry.push("http://hiphotos.baidu.com/%BA%EC%C2%A5%C7%E9%C3%CE/pic/item/cf4013658b43f3ccf7365493.jpg");
imgAry.push("http://hiphotos.baidu.com/%BA%EC%C2%A5%C7%E9%C3%CE/pic/item/2f78156fb7c8dae681cb4a93.jpg");
imgAry.push("http://hiphotos.baidu.com/%BA%EC%C2%A5%C7%E9%C3%CE/pic/item/ed9e7094af1f2677d0135e23.jpg");
var i = 0;
$(function () {
$("div").css("width", "300px").css("height", "200px").css("border", "1px solid red");
$("img").css("width", "200px").css("height", "200px")
.css("filter", "progid:DXImageTransform.Microsoft.Alpha(startX=0, startY=0, finishX=100, finishY=100,style=3,opacity=0,finishOpacity=100)");
/*
调节 style=3,opacity=0,finishOpacity=100 这三个值改变效果,
style 渐变样式 0,1,2,3
opacity 开始透明度 0 25 50 75 100
finishOpacity 结束透明读 0 25 50 75 100
*/
show();
});
function show () {
$("div").css("background-color", ary[i]);
$("img").attr("src", imgAry[i]);
i++;
if (i > ary.length - 1) {
i = 0;
}
setTimeout("show()", "1000");
}
// -->
</mce:script>
</head>
<body>
<div>
<img src="http://hiphotos.baidu.com/%BA%EC%C2%A5%C7%E9%C3%CE/pic/item/cf4013658b43f3ccf7365493.jpg" mce_src="http://hiphotos.baidu.com/%BA%EC%C2%A5%C7%E9%C3%CE/pic/item/cf4013658b43f3ccf7365493.jpg"/>
</div>
</body>
</html>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论