dojo fasheye 鱼眼

适用于dojo1.x版本...

鱼眼特效是指当鼠标移动至该图标处,图标会逐渐变大.

首先是js和css代码:
<head>
<style type="text/css">
//2个相关样式
@import "dojo/dojo/resources/dojo.css";
@import "dojo/dojox/widget/FisheyeList/FisheyeList.css";
</style>
//引入必须的js 设置debug
<script type="text/javascript" src="dojo/dojo/dojo.js"
djConfig="isDebug:false, parseOnLoad: true"></script>
<script type="text/javascript" language="JavaScript">
//使用dojo的库
dojo.require("dojox.widget.FisheyeList");
dojo.require("dojo.parser");
//自定义脚本
<!--
function load_app(id){
if (id=="vwin"){
open("http://www.vwintech.com", "_self");
}
if (id=="163"){
open("http://www.163.com", "_self");
}
if (id=="xiaxin"){
open("http://www.xiashixin1985.51.com", "_self");
}
}
-->
</script>
</head>

和dojo相结合的html代码:
<body>
<%--
dojoType="dojox.widget.FisheyeList" dojoType设置
itemWidth/itemHeight:普通模式的宽和高
itemMaxWidth/itemMaxHeight:最大模式的宽和高
orientation:是否水平,默认为垂直方式
effectUnits:有效相关变化的单元数
itemPadding:调整每项的大小
attachEdge:icon跟随的方向 分为bottom,、center、top三种
labelEdge:标签的显示位置:bottom,和top
conservativeTrigger:进入图标才展现鱼眼效果
--%>
//主层
<div dojoType="dojox.widget.FisheyeList"
itemWidth="50"
itemHeight="50"
itemMaxWidth="200"
itemMaxHeight="200"
orientation="horizontal"
effectUnits="2"
itemPadding="10"
attachEdge="top"
labelEdge="bottom"
conservativeTrigger="false">
//下面为包含在主层中的子层
<%--
dojoType="dojox.widget.FisheyeListItem" 设置为子项
--%>
<div dojoType="dojox.widget.FisheyeListItem"

iconsrc="image1.jpg" label="维远泰克">
</div>
<div dojoType="dojox.widget.FisheyeListItem"

iconsrc="image2.jpg" label="网易">
</div>
<div dojoType="dojox.widget.FisheyeListItem"

iconsrc="image3.jpg" label="夏新博客">
</div>
</div>
</body>

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值