<script>
$(function() {
if (!(!$.support.opacity && !$.support.style)) {
$("body").append("<style>.floatmenu161020{position:fixed;left:50%;margin-left:610px;bottom:10px;z-index:999}.floatmenu161020 .btn{width:72px;height:72px;margin-bottom:1px;position:relative}.floatmenu161020 .btn-qq{background:#6da9de url(http://www.ezbst.cn/p/img/floatmenuimg161020.png) 0 -219px no-repeat}.floatmenu161020 .btn-qq a{display:block}.floatmenu161020 .btn-fabu{background:#f70 url(http://www.ezbst.cn/p/img/floatmenuimg161020.png) 0 0 no-repeat;display:block}.floatmenu161020 .btn-wx{background:#78c340 url(http://www.ezbst.cn/p/img/floatmenuimg161020.png) 0 -146px no-repeat}.floatmenu161020 .btn-wx .floatmenu_pic{position:absolute;left:-156px;top:0;display:none;width:156px;height:156px}.floatmenu161020 .btn-phone{background:#fbb01f url(http://www.ezbst.cn/p/img/floatmenuimg161020.png) 0 -73px no-repeat}.floatmenu161020 .btn-phone .floatmenu_phone{background-color:#fbb01f;position:absolute;width:160px;left:-160px;top:0;line-height:72px;color:#fff;font-size:18px;text-align:center;display:none}.floatmenu161020 .btn-top{background:#666 url(http://www.ezbst.cn/p/img/floatmenuimg161020.png) 0 -292px no-repeat;cursor:pointer;display:none}.floatmenu161020 *:hover{filter:Alpha(Opacity=80);-moz-opacity:.8;opacity:.8}.floatmenu161020 .btn-phone:hover,.floatmenu161020 .floatmenu_phone:hover,.floatmenu161020 .btn-wx:hover,.floatmenu161020 .btn-wx img:hover{filter:Alpha(Opacity=100);-moz-opacity:1;opacity:1}</style><div id='floatmenuid161020' class='floatmenu161020'><a href='http://www.ezbst.cn/LifeDo.html' class='btn btn-fabu' target='_blank'></a><div class='btn btn-phone'><div class='floatmenu_phone'>0711-3240005</div></div><div class='btn btn-wx'><img class='floatmenu_pic' src='http://www.ezbst.cn/s/img/w/1/Index6/WeixinQrcode.png' /></div><div class='btn btn-qq'><a href='tencent://message/?uin=7456116' class='btn btn-qq' target='_blank'></a></div><div class='btn btn-top'></div></div>");
$("#floatmenuid161020").each(function() {
$(this).find(".btn-wx").mouseenter(function() { $(this).find(".floatmenu_pic").fadeIn("fast"); });
$(this).find(".btn-wx").mouseleave(function() { $(this).find(".floatmenu_pic").fadeOut("fast"); });
$(this).find(".btn-phone").mouseenter(function() { $(this).find(".floatmenu_phone").fadeIn("fast"); });
$(this).find(".btn-phone").mouseleave(function() { $(this).find(".floatmenu_phone").fadeOut("fast"); });
$(this).find(".btn-top").click(function() { $("html, body").animate({ "scroll-top": 0 }, "fast"); });
});
var lastRmenuStatus = false;
$(window).scroll(function() {
if ($(window).scrollTop() > 200) $("#floatmenuid161020").data("expanded", true); else $("#floatmenuid161020").data("expanded", false);
if ($("#floatmenuid161020").data("expanded") != lastRmenuStatus) {
lastRmenuStatus = $("#floatmenuid161020").data("expanded");
if (lastRmenuStatus) $("#floatmenuid161020 .btn-top").slideDown(); else $("#floatmenuid161020 .btn-top").slideUp();
}
});
}
});
</script>
效果点击查看
CSS代码中所用背景图片:
Copyright © 台州视窗 All rights reserved 浙ICP备14038619号
免责声明:本站只提供交流平台,所有信息仅代表网友个人观点,不代表本站立场。如有侵害到您的合法权益,请您积极向我们投诉。
Powered by TZ106.COM 本站禁止色情、政治、反动等国家法律不允许的内容,注意自我保护,谨防上当受骗