图集1/3

正文 4531字数 114,628阅读

html
* { padding: 0; margin: 0; font-size: 12px; } body{height:2000px;} ul { list-style: none; } a { text-decoration: none; }
Run code
Cut to clipboard
    <div id="box-kefu"> <div class="kefu-close"></div> <div class="kefu-open"> <div> <ul> <li><a href="http://wpa.qq.com/msgrd?v=3&uin=645481746&site=qq&menu=yes" target="_blank"><i class="qq"></i>在线客服1</a></li> <li><a href="http://wpa.qq.com/msgrd?v=3&uin=1712816412&site=qq&menu=yes" target="_blank"><i class="qq"></i>在线客服2</a></li> <li><a href="http://wpa.qq.com/msgrd?v=3&uin=645481746&site=qq&menu=yes" target="_blank"><i class="qq"></i>在线客服3</a></li> <li><a href="http://www.97zzw.com/plus/guestbook.php#liuyan" target="_blank"><i class="txt"></i>咨询留言</a></li> </ul> </div> <a href="javascript:;" class="close">关闭</a> </div> </div> <script>var online= new Array();</script> <script src="http://webpresence.qq.com/getonline?Type=1&645481746:1712816412:645481746:"></script> <script> (function($){ for (var i=0; i<online.length; i++) { if (online[i]) jQuery("#box-kefu .qq").eq(i).addClass("online"); } var _open = $("#box-kefu").find(".kefu-open"), _close = $("#box-kefu").find(".kefu-close"); _open.find("a").hover(function(){ $(this).stop(true,true).animate({paddingLeft:20},200).find("i").stop(true,true).animate({left:75},200); },function(){ $(this).stop(true,true).animate({paddingLeft:35},200).find("i").stop(true,true).animate({left:10},200); }); _open.find(".close").click(function(){ _open.animate({width:148},200,function(){ _open.animate({width:0},200,function(){ _close.animate({width:34},200); }); }); }); _close.click(function(){ _close.animate({width:44},200,function(){ _close.animate({width:0},200,function(){ _open.animate({width:138},200); }); }); }); })(jQuery) </script>
    Run code
    Cut to clipboard

      css
      @charset "utf-8"; #box-kefu { position: fixed; right: 0; top: 20%; z-index: 100; _position: absolute; _top: expression(eval(document.documentElement.scrollTop+100)); } #box-kefu .kefu-open { position: absolute; top: 0; right: 0; width: 138px; padding: 46px 0 0 0; background: url(../images/kefu_icon.png) no-repeat -46px 0; _background-image: url(../images/kefu_icon.gif); overflow: hidden; } #box-kefu .kefu-open .close{ display: block; position: absolute; width: 22px; height: 22px; right: 0; top: 0; text-indent: -9999px; } #box-kefu .kefu-open div { padding-bottom: 5px; background: url(../images/kefu_bg.png) no-repeat -268px bottom; width: 134px; } #box-kefu .kefu-open ul { background: url(../images/kefu_bg.png) repeat-y 0 0 #939393; } #box-kefu .kefu-open li { height: 32px; line-height: 32px; padding: 0 15px 2px; background: url(../images/kefu_bg.png) no-repeat -134px bottom; } #box-kefu .kefu-open li a { color: #fff; display: block; position: relative; zoom: 1; padding-left: 35px; } #box-kefu .kefu-open li a:hover { text-decoration: none; } #box-kefu .kefu-open li a i { display: inline-block; position: absolute; left: 10px; top: 6px; width: 21px; height: 21px; background: url(../images/kefu_icon.png) no-repeat 9999px 9999px; _background-image: url(../images/kefu_icon.gif); } #box-kefu .kefu-open li a i.qq { background-position: -86px -56px; } #box-kefu .kefu-open li a i.online { background-position: -56px -56px; } #box-kefu .kefu-open li a i.txt { background-position: -56px -86px; } #box-kefu .kefu-close { position: absolute; top: 5px; right: 0; width: 0; height: 127px; padding: 0; background: url(../images/kefu_icon.png) no-repeat 0 0; _background-image: url(../images/kefu_icon.gif); cursor: pointer; overflow: hidden; }
      Run code
      Cut to clipboard

        图片