图片梯形排列鼠标滑过图片缩放排列效果

来源:https://www.sucaihuo.com/js/1548.html 2017-03-26 21:31浏览(513) 收藏

这是一款完美的展示了图片鼠标滑过弹出层效果,喜欢可以下载哦。
图片梯形排列鼠标滑过图片缩放排列效果
分类:图片代码 > 鼠标滑过 难易:
查看演示 下载资源 下载积分: 20 积分
var Bookrack = function(a, b, c, e) {
    this.scale = e || 0.4;
    this.x = b || 120;
    this.y = c || 160;
    this.border = 2;
    this.init(a);
    this.exec(Math.ceil(Math.random() * this.imgs.length))
};
Bookrack.prototype = {
    init: function(a) {
        this.width = a.clientWidth - 2 * this.x * this.scale;
        a.style.position = "relative";
        a.style.height = this.y + "px";
        this.imgs = a.getElementsByTagName("a");
        var b = this,
        c = document.createElement("span"),
        e,
        d;
        this.each(function(a, g) {
            a.style.position = "absolute";
            a.style.bottom = "0";
            a.style.border = this.border + "px solid gray";
            a.style.left = this.width * (g / this.imgs.length) + 2 * this.border + "px";
            a.setAttribute("dir", g);
            d = a.getElementsByTagName("img")[0].getAttribute("alt").split("|");
            e = c.cloneNode(!0);
            e.innerHTML = a.getAttribute("title");
            a.appendChild(e);
            a.onmouseover = function() {
                b.exec(this.getAttribute("dir"))
            }
        })
评论0
头像

系统已开启自动识别垃圾评论机制,识别到的自动封号,下载出错或者资源有问题请联系全栈客服QQ 1915635791

1 2