javascript - 上层 下层 两张图片同时转动 现在只能转动上层的图片
高洛峰
高洛峰 2017-04-11 12:14:51
[JavaScript讨论组]




    
    shoes




    

正在生成3D影像...

选材料


小牛皮

---------- shoes.css * { margin: 0; padding: 0; } img { border: 0; } #imageContainerF img, #imageContainerS img ,#imageContainerT img { position: absolute; left: 120px; bottom: 20px; cursor: pointer; z-index: 1 } #imageContainerF img.active { z-index: 999; } #imageContainerS img.active { z-index: 999; } #imageContainerT img.active { z-index: 999; } #rig { border-top: 2px solid #b768a5; border-right: 1px solid #d5cdda; border-left: 1px solid #d5cdda; border-bottom: 1px solid #d5cdda; width: 360px; height: 450px; position: absolute; left: 900px; bottom: 70px; cursor: pointer; } #rig p { color: #b768a5; text-align: center; font-size: 12px; line-height: 40px; cursor: pointer; } #rig select { width: 240px; height: 35px; margin-top: 10px; cursor: pointer; } #rig span { line-height: 26px; color: #666; border: 0px; font-size: 12px; line-height: 46px; cursor: pointer; } .rig-img { cursor: pointer; } #textCon { position: absolute; bottom: 300px; left: 590px; z-index: 9999; } ---------- shoes.js var imageObjectF = { clickSwapF: function(obj) { obj.click(function() { var activeImage = $(this).children("img.active"); activeImage.removeClass("active"); if (activeImage.next().length > 0) { activeImage.next().addClass("active"); } else { $(this).children("img:first-child").addClass("active"); } return false; }) } }; var imageObjectS = { clickSwapS: function(obj) { obj.click(function() { var activeImage = $(this).children("img.active"); activeImage.removeClass("active"); if (activeImage.next().length > 0) { activeImage.next().addClass("active"); } else { $(this).children("img:first-child").addClass("active"); } return false; }) } }; var imageObjectT = { clickSwapT: function(obj) { obj.click(function() { var activeImage = $(this).children("img.active"); activeImage.removeClass("active"); if (activeImage.next().length > 0) { activeImage.next().addClass("active"); } else { $(this).children("img:first-child").addClass("active"); } return false; }); } }; $(function() { imageObjectF.clickSwapF($('#imageContainerF')); imageObjectS.clickSwapS($('#imageContainerS')); imageObjectT.clickSwapT($('#imageContainerT')); });
高洛峰
高洛峰

拥有18年软件开发和IT教学经验。曾任多家上市公司技术总监、架构师、项目经理、高级软件工程师等职务。 网络人气名人讲师,...

全部回复(0)
热门教程
更多>
最新下载
更多>
网站特效
网站源码
网站素材
前端模板
关于我们 免责申明 举报中心 意见反馈 讲师合作 广告合作 最新更新
php中文网:公益在线php培训,帮助PHP学习者快速成长!
关注服务号 技术交流群
PHP中文网订阅号
每天精选资源文章推送

Copyright 2014-2026 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号