<!--请将以下这段代码放到网页中您想要显示固定图标的位置-->
<div id="FloatDIV" style="position: absolute;top: 0px; border-right: activeborder 1px solid; border-top: activeborder 1px solid; border-left: activeborder 1px solid; border-bottom: activeborder 1px solid; z-index:9999">
<img src="http://www.freeitjc.com/wp-content/uploads/2014/07/FreeITAPP.jpg" >
</div>
<div id="showservicepeople" class="showservicepeople" onclick="showservicepeople()">
</div>
<!--可以引用CSS样式和布局-->
<script type="text/javascript">
var MarginLeft =130; //浮动层离浏览器右侧的距离
var MarginTop = 190; //浮动层离浏览器顶部的距离
var Width = 20; //浮动层宽度
var Heigth= 85; //浮动层高度
//设置浮动层宽、高
function Set()
{
document.getElementById("FloatDIV").style.width = Width + ‘px‘;
document.getElementById("FloatDIV").style.height = Heigth + ‘px‘;
}
//实时设置浮动层的位置
function Move()
{
var b_top = window.pageYOffset
|| document.documentElement.scrollTop
|| document.body.scrollTop
|| 0;
var b_width= document.body.clientWidth;
document.getElementById("FloatDIV").style.top = b_top + MarginTop + ‘px‘;
document.getElementById("FloatDIV").style.left = b_width - Width - MarginLeft + ‘px‘;
setTimeout("Move();",100);
}
function showservicepeople()
{
location.href=‘ http://www.freeitjc.com/wp-content/uploads/2014/07/FreeITAPP.jpg‘;
}
Set();
Move();
</script>
css控制右侧二维码浮动代码