JS CSS 网页 简单 右侧 悬浮

<!--右侧效果-->

<
script> $().ready(function() { $(".orm").hover(function() { $(this).css("right", "-2px"); }, function() { $(this).css("right", "-175px"); }); }); </script>   <div class="orm" style="position:absolute; z-index:1000; top:160px; right:-175px; background:url('./images/fxico.png');">
    <
span style="margin-left:80px;">与500家知名电商合作/span>
  </
div>   <div class="orm" style="position:absolute; z-index:1000; top:240px; right:-175px; background:url('./images/czico.png');">
    <
span style="margin-left:80px;">网上充值用皓诚放心</span>
  </
div>   <div class="orm" style="position:absolute; z-index:1000; top:320px; right:-175px; background:url('./images/lxico.png');">
    <
span style="margin-left:80px;">提供更专业的预定服务</span>
  </
div>   <div class="orm" style="position:absolute; z-index:1000; top:400px; right:-175px; background:url('./images/tgico.png');">
    <
span style="margin-left:80px;">餐饮娱乐,休闲酒店各种生活</span>
  </
div>

 

JS效果 页面固定

<style> *{margin:0} body{height:1000px;width:1000px;} #a{width:300px;height:100px;background:red;} </style> <script> var isie6 = window.XMLHttpRequest?false:true; window.onload = function(){ var a = document.getElementById('a'); var d = document.getElementById('d'); if(isie6){ a.style.position = 'absolute';    window.onscroll = function(){ d.innerHTML = ''; } }else{ a.style.position = 'fixed'; }
a.style.right
= '0'; a.style.bottom = '0';
}
</script> <div id='a'>测试</div>
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值