jQuery实现底部浮动窗口效果

所属分类: 网络编程 / JavaScript 阅读数: 1261
收藏 0 赞 0 分享

本文实例讲述了jQuery实现底部浮动窗口效果。分享给大家供大家参考,具体如下:

<script type="text/javascript" src="jquery-1.10.1.min.js"></script>
<style type="text/css">
#foot_tel { width:100%;height:43px; background:url(styles/js/swt/tel_bj_20131123.png) no-repeat center center;
_top:expression(eval(document.documentElement.scrollTop+document.documentElement.clientHeight-this.offsetHeight));
z-index: 10000; position:fixed; _position:absolute; bottom:0px; left:0px;}
#foot_telBox { margin:0px auto;width:1112px; z-index: 8999;height:43px; overflow:hidden;}
#foot_telBox li {list-style:none;}
#foot_telBox .tel_txt { border:0px; float:left; font-size:14px; line-height:22px; height:22px; color:#999999; background:none; margin:16px 10px 0 244px; width:160px;}
#foot_telBox .tel_sub { border:0px; float:left; height:25px; color:#0C6796; background: url(styles/js/swt/tel_sub.png) no-repeat; width:92px;cursor:pointer;margin-top: 14px;}
#qqzhenshi{float:left;margin-left: 35px;}
#qqzhenshi a{display: block; width: 135px; height: 20px; margin: 15px 0px 0px 0px;}
#foot_show { width:100%; height:140px; background: url(styles/js/swt/footAdd_bg.png);
_top:expression(eval(document.documentElement.scrollTop+document.documentElement.clientHeight-this.offsetHeight));
z-index: 20; position:fixed; _position:absolute; bottom:-140px; left:0px;}
.foot_showBox{width:1000px;height:79px;margin:10px auto 0px auto;}
</style>
<div id="foot_swt">
  <div id="foot_tel">
    <div id="foot_telBox">
        <li style="float:left;">
          <input type="text" onclick="openOline();" value="在线问问医生" class="tel_txt" />
          <input type="button" value="" onclick="openOline();" class="tel_sub" />
        </li>
        <li id="qqzhenshi"><a href="###" target="_blank"></a></li>
        <li style="width: 422px; float: right;list-style: none;"><span style="float: left; padding-top: 14px; width:360px; text-align:left"><a style="display:block" href="###" target="_blank"><img src="styles/js/swt/anniu_20130627.gif"></a></span><span style="float:right;"><a href="#" target="_self"><img src="styles/js/swt/tel_s4.gif"></a></span></li>
    </div>
  </div>
  <div id="foot_show">
    <div class="foot_showBox"><img src="styles/js/swt/footAdd.png" alt="" border="0" usemap="#Mapfoot" />
      <map name="Mapfoot" id="Mapfoot">
        <area shape="rect" coords="640,10,891,288" href="###" target="_blank" />
      </map>
    </div>
  </div>
</div>
<script type="text/javascript">
$(function(){
  $('#foot_swt').mouseover(function(){
    $('#foot_show').stop().animate({'bottom':'0px'},'fast');
  })
  $('#foot_swt').mouseout(function(){
    $('#foot_show').stop().animate({'bottom':'-140px'},'fast');
  })
});
function openOline(){
  window.open("###", "_blank");
}
</script>

运行效果如下图:

更多关于jQuery相关内容感兴趣的读者可查看本站专题:《jQuery扩展技巧总结》、《jQuery常用插件及用法总结》、《jQuery拖拽特效与技巧总结》、《jQuery表格(table)操作技巧汇总》、《jquery中Ajax用法总结》、《jQuery常见经典特效汇总》、《jQuery动画与特效用法总结》及《jquery选择器用法总结

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

更多精彩内容其他人还在看

Angular使用Md5加密的解决方法

这篇文章主要介绍了Angular使用Md5加密的解决方法,需要的朋友可以参考下
收藏 0 赞 0 分享

详解JS构造函数中this和return

本文通过实例代码给大家介绍了JS构造函数中this和return,需要的朋友参考下吧
收藏 0 赞 0 分享

ES6中Array.find()和findIndex()函数的用法详解

ES6为Array增加了find(),findIndex函数。find()函数用来查找目标元素,找到就返回该元素,找不到返回undefined,而findIndex()函数也是查找目标元素,找到就返回元素的位置,找不到就返回-1。下面通过实例详解,需要的朋友参考下吧
收藏 0 赞 0 分享

JS闭包的几种常见形式实例详解

本文通过实例代码给大家详细介绍了js闭包的几种常见形式,代码简单易懂,非常不错,具有参考借鉴价值,需要的朋友参考下
收藏 0 赞 0 分享

ES6中Array.copyWithin()函数的用法实例详解

ES6为Array增加了copyWithin函数,用于操作当前数组自身,用来把某些个位置的元素复制并覆盖到其他位置上去。下面重点给大家介绍ES6中Array.copyWithin()函数的用法,需要的朋友参考下
收藏 0 赞 0 分享

Javascript 严格模式use strict详解

严格模式:由ECMA-262规范定义的JavaScript标准,对javascrip的限制更强。这篇文章主要介绍了Javascript 严格模式use strict详解 ,需要的朋友可以参考下
收藏 0 赞 0 分享

引入JavaScript时alert弹出框显示中文乱码问题

今天在HTML中引入JavaScript文件运行时,alert弹出的提示框中文显示为乱码,怎么解决此问题呢?下面小编给大家带来了引入JavaScript时alert弹出框显示中文乱码问题的解决方法,一起看看吧
收藏 0 赞 0 分享

AngularJs 延时器、计时器实例代码

这篇文章主要介绍了AngularJs 延时器、计时器实例代码,需要的朋友可以参考下
收藏 0 赞 0 分享

JS分页的实现(同步与异步)

这篇文章主要介绍了JS分页的实现(同步与异步),需要的朋友可以参考下
收藏 0 赞 0 分享

Angularjs自定义指令实现分页插件(DEMO)

由于最近的一个项目使用的是angularjs1.0的版本,涉及到分页查询数据的功能,后来自己就用自定义指令实现了该功能,下面小编把实例demo分享到脚本之家平台,需要的朋友参考下
收藏 0 赞 0 分享
查看更多