栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 软件开发 > Web开发 > JavaScript

JS实现简单易用的手机端浮动窗口显示效果

JavaScript 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

JS实现简单易用的手机端浮动窗口显示效果

本文实例讲述了JS实现简单易用的手机端浮动窗口显示效果。分享给大家供大家参考,具体如下:

html:


.fdBonTel{ width:100%; height:53px; position:fixed; background:#0052ae; text-align:center; left:0; bottom:0; z-index:999; }
.fdOnline{ background:url(index/images/online.png) no-repeat; width:255px; height:181px; position:fixed; left:50%; margin-left:-128px; top:40%; z-index:999; border-radius: 15px; box-shadow: 0 0 20px rgba(10, 2, 4, 0.75);}
.fdonline .fdOClose{ width:44px; height:44px; display:block; margin-top:-17px; margin-right:-6px;}
.fdonline .fdOTel{ background:#CF3; width:127px; height:58px; display:block; margin-top:123px;}
.fdonline .fdOOn{ background:#036; width:128px; height:58px; display:block; margin-top:96px;}


  
  
    
      
      
    
  


  
  
  


js:

// Javascript document
document.writeln("");
document.writeln(".fdBonTel{ width:100%; height:53px; position:fixed; background:#0052ae; text-align:center; left:0; bottom:0; z-index:999; }");
document.writeln(".fdOnline{ background:url(index/images/online.png) no-repeat; width:255px; height:181px; position:fixed; left:50%; margin-left:-128px; top:40%; z-index:999; border-radius: 15px; box-shadow: 0 0 20px rgba(10, 2, 4, 0.75);}");
document.writeln(".fdonline .fdOClose{ width:44px; height:44px; display:block; margin-top:-17px; margin-right:-6px;}");
document.writeln(".fdonline .fdOTel{ width:127px; height:58px; display:block; margin-top:123px;}");
document.writeln(".fdonline .fdOOn{ width:128px; height:58px; display:block; margin-top:96px;}");
document.writeln("");
document.writeln("");
document.writeln(" ");
document.writeln(" ");
document.writeln("   ");
document.writeln("     ");
document.writeln("     ");
document.writeln("   ");
document.writeln(" ");
document.writeln("");
document.writeln("");
document.writeln(" ");
document.writeln(" ");
document.writeln("  ");
document.writeln("");
function showonline() {
  if (document.getElementById("fdOnline")) {
    if (document.getElementById("fdOnline").style.display == "none") {
      document.getElementById("fdOnline").style.display = "block";
    }
  }
}
function closeonline() {
  document.getElementById("fdOnline").style.display = "none";
  setInterval(chkSWT, 30000);
};
$(function(){
  setInterval(showOnline, 30000);
});

效果图:

更多关于Javascript相关内容感兴趣的读者可查看本站专题:《Javascript遍历算法与技巧总结》、《Javascript切换特效与技巧总结》、《Javascript查找算法技巧总结》、《Javascript动画特效与技巧汇总》、《Javascript错误与调试技巧总结》、《Javascript数据结构与算法技巧总结》及《Javascript数学运算用法总结》

希望本文所述对大家Javascript程序设计有所帮助。

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/94363.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号