css+jquery实现简洁蓝色在线客服和返回顶部悬浮按钮效果代码

代码语言:html

所属分类:布局界面

代码描述:css+jquery实现简洁蓝色在线客服和返回顶部悬浮按钮效果代码

代码标签: 蓝色 在线 客服 返回 顶部 悬浮 按钮 效果

下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开

<!DOCTYPE html>
<html>

<head>
   
<meta charset="UTF-8">
   
<meta name="viewport" content="width=device-width,initial-scale=1.0,maximum=1.0,minimum=1.0,user-scalable=0" />
   
<title>BFW NEW PAGE</title>
   
<script id="bfwone" data="dep=jquery.17&err=0" type="text/javascript" src="//repo.bfw.wiki/bfwrepo/js/bfwone.js"></script>
   
<script type="text/javascript">
        bready
(function() {
           
//首先将#back-to-top隐藏
    $
("#icon_top").hide();
   
//当滚动条的位置处于距顶部100像素以下时,跳转链接出现,否则消失
 
      $
(window).scroll(function() {
       
if ($(window).scrollTop() > 100) {
          $
("#icon_top").fadeIn(1500);
       
} else {
          $
("#icon_top").fadeOut(1500);
       
}
     
});
     
//当点击跳转链接后,回到页面顶部位置
      $
("#icon_top").click(function() {
        $
('body,html').animate({
          scrollTop
: 0
       
},
       
1000);
       
return false;
     
   
});
       
});
   
</script>

   
<style type="text/css">
        /* fixed */
        .fixed {
            position: fixed;
           
            height: auto;
            right: 15px;
            top: 250px;
            z-index: 800;
        }
   
        .fixed li {
            list-style: none;
            width: 115px;
            height: auto;
            max-height: 234px;
        }
   
        .fixed li img {
            width: 100%;
        }
   
        .fixed-qq, .fixed-close {
            display: inline-block;
            width: 100%;
            height: 31px;
            position: absolute;
            top: 186px;
            left: 0;
            background-image: url(#);
            cursor: pointer;
        }
   
        .fixed-close {
            height: 20px;
            top: 0;
        }
   
        #icon_top {
            display: none;
        }
   
        .fixed-phone {
         
     .........完整代码请登录后点击上方下载按钮下载查看

网友评论0