点击进入知科官方网站
查看: 1310  |  回复: 5
 
 
xwqsun
积分:90
注册时间:2014-06-14
最后登录:2014-06-14
发送短消息
发表于 2014-06-14 19:31
页面地址:

问题描述:求一个 首页漂浮微信二维码的代码

截图说明:
 
 
Official服务
积分:16745
注册时间:2012-01-02
最后登录:2015-09-24
发送短消息
回复于 2014-06-15 16:46
1楼
 
下载这个图片 上传到/p/目录
 
然后把以下代码放在首页文件的 </body>的前面,或者</asp:Content><asp:Content ID="Content4" ContentPlaceHolderID="CPH_foot" runat="Server">的前面。
 
 
 
 
<style>#code,#code_hover,#gotop{width:36px;height:48px;background:url(/p/scrbarbg.gif) no-repeat;position:fixed;right:50px;cursor:pointer;_position:absolute;_bottom:auto;_top:expression(eval(document.documentElement.scrollTop+document.documentElement.clientHeight-this.offsetHeight-(parseInt(this.currentStyle.marginTop,10)||0)-(parseInt(this.currentStyle.marginBottom,10)||0)));z-index:999999999;}#code{background-position:-276px -258px;bottom:120px;_margin-bottom:120px;}#code_hover{background-position:-316px -258px;bottom:120px;_margin-bottom:120px;}#gotop{background-position:-276px -310px;bottom:67px;_margin-bottom:67px;}#code_img{width:270px;height:355px;background:url(/p/scrbarbg.gif) -4px -3px no-repeat;position:fixed;right:90px;bottom:67px;cursor:pointer;display:none;_position:absolute;_bottom:auto;_top:expression(eval(document.documentElement.scrollTop+document.documentElement.clientHeight-this.offsetHeight-(parseInt(this.currentStyle.marginTop,10)||0)-(parseInt(this.currentStyle.marginBottom,10)||0)));_margin-bottom:67px;z-index:999999999;}#ReturnTop{display:none;}</style>
<div id="code"></div>
<div id="code_img"></div>
<a id="gotop" href="javascript:void(0)"></a>
<script>function _scrbar(){h = $(window).height();t = $(document).scrollTop();if (t > h){$('#gotop').show();}else{$('#gotop').hide();}}$(document).ready(function(e){_scrbar();$('#gotop').click(function(){$(document).scrollTop(0);});$('#code').hover(function(){$(this).attr('id','code_hover');$('#code_img').show();},function(){$(this).attr('id','code');$('#code_img').hide();})});$(window).scroll(function(e){_scrbar();})</script>
 
 
 
 
Official服务
积分:16745
注册时间:2012-01-02
最后登录:2015-09-24
发送短消息
回复于 2014-06-15 16:51
2楼
 
 
效果如图:
 
 
 
 
Official服务
积分:16745
注册时间:2012-01-02
最后登录:2015-09-24
发送短消息
回复于 2014-06-15 16:55
3楼
 
 
看看这个站首页 http://demo4.hbzkwl.com/  刚加了这个代码,
 
 
Official服务
积分:16745
注册时间:2012-01-02
最后登录:2015-09-24
发送短消息
回复于 2014-06-15 17:15
4楼
.
 
如果页面中没有引用jquery 则需要引用jquery才可使用
 
 
lvsenlin88
积分:225
注册时间:2013-07-04
最后登录:2015-01-04
发送短消息
回复于 2014-07-02 12:25
5楼
 1、什么叫首页文件,首页文件在哪里?
2、“如果页面中没有引用jquery 则需要引用jquery才可使用”,这个怎样操作?
 
回复帖子