点击vip按钮拖动,拖到flash上去的时候vip按钮被flash层遮住了..
请问大家有什么办法解决?
本人用了各种方法也不行..
实在绝望了,才上论坛求助.
ie跟其他主流浏览器都不行
flash一定要用iframe引用的.因为我的目前的项目要用iframe引用才行.代码直接复制到本地就可以用了.<!doctype html><html>

<head>
<link rel="stylesheet" href="http://www.6637.com/static/css/gm.css" />
<script type="text/javascript" src="http://www.6637.com/static/js/jquery-1.8.0.min.js"></script>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
</head> <body>

<iframe src="http://www.6637.com/ren.swf" frameborder="0" width="1000" height="600" style="position:absolute;z-index:1;top:100px;left:50px;z-index:55"></iframe> <div class="gm_box" style="top:0px;left:0px;width:75px;">
<div class="gm_ico" id="gm_ico" style="width:75px;height:70px">
<!-- <a href="#" class="ddpng off"></a> -->
<object width="75" height="70" type="application/x-shockwave-flash" data="http://www.6637.com/static/images/gm/gm_v3.swf" id="ico_flash">
<param name="movie" value="http://www.6637.com/static/images/gm/gm_v3.swf">
<param name="wmode" value="transparent">
</object>
<!-- <img src="http://www.6637.com/static/images/gm/gm_btn_v1.jpg" width="148" height="36" alt=""> -->
</div>
<div class="gm_content" style="display: none;">
<!-- <span id="gm_close">close</span> -->
<p class="p1" style="text-indent: 20px;">亲,您已拥有VIP领取高额<span style="color:#003cff">充值返利</span>的资格!</p>
<a href="http://wpa.qq.com/msgrd?v=3&amp;uin=1664928770&amp;site=qq&amp;menu=yes" target="_blank" class="gm_get" title="我要领取"></a>
<div class="gm_photo">
<div class="click"> 
<object width="33" height="14" type="application/x-shockwave-flash" data="http://www.6637.com/static/images/gm/click.swf">
<param name="movie" value="http://www.6637.com/static/images/gm/click.swf">
<param name="wmode" value="transparent">
</object> 
</div>
<a target="_blank" href="http://wpa.qq.com/msgrd?v=3&amp;uin=1664928770&amp;site=qq&amp;menu=yes"><img border="0" src="http://www.6637.com/uploads/gm/1357959515.jpg" alt="点击和美女客服亲密接触" title="点击和美女客服亲密接触"></a>
</div>
<p class="gm_name"><span class="gm_status on">VIP客服 1664928770</span></p>
<!-- off离线  on在线 -->
</div>
</div> <script type="text/javascript"> var flag = false;
var x1,y1;
$(".gm_ico").mousedown(function(e){
var posX = e.clientX - (e.clientX - $(this).parent().position().left);
x1 = (e.clientX - $(this).parent().position().left)
$(this).parent().css("left",posX+"px"); var posY = e.clientY - (e.clientY - $(this).parent().position().top);
y1 = (e.clientY - $(this).parent().position().top)
$(this).parent().css("top",posY+"px");
flag =true;
}); $(".gm_ico").mousemove(function(e){
if(flag){
$(".gm_box").unbind(o);
$(this).parent().css("left",(e.clientX - x1)+"px");
$(this).parent().css("top",(e.clientY - y1)+"px");
}
});
$(".gm_ico").mouseup(function(){
$(".gm_box").bind(o);
flag = false;
}); var o = {
mouseenter : function(){
$("#gm_ico a").removeClass("off").addClass("on");
  $(".gm_content").stop(true, true).slideDown("fast");
},
mouseleave : function(){
$("#gm_ico a").removeClass("on").addClass("off");
$(".gm_content").stop(true, true).slideUp("fast");
}
} $(".gm_box").bind(o); </script> </body></html>

解决方案 »

  1.   

    顶层下加一层iframe层
    <iframe style="position: absolute;width:100px;height:100px;top:100px;left:10px;z-index:1" ></iframe>
    iframe把大小,位置参数改成,与你要置顶的层的大小,位置一样,置顶的层 z-index大于1
      

  2.   

    iframe 的z-index设置为1, 你的Div的z-index设置大于1的数就可以了!例:
    <iframe style="position: absolute;width:100px;height:100px;top:100px;left:10px;z-index:1" ></iframe><div style="z-index:2"></div>
      

  3.   

    z-index属性是用来设置层次优先级的!
      

  4.   

    这样吧,我提供个思路。
    <div>
        <div id="div1" style="width:100px;height:100px;z-index:10;display:none;"></div>
        <iframe style="position: absolute;width:100px;height:100px;top:100px;left:10px;z-index:1" ></iframe>
    </div><div id="div2" style="z-index:20"></div>这样你拖动div2的时候,就让div1 display:block;然后释放div2的时候,就将div1再一次none.js就不写了,你自己试试看,上次有个类似问题我就这样解决的
      

  5.   


    不知道是不是我理解错了你的要求。 我确认下,是不是拖动div的时候,拖到iframe上会拖不动?然后iframe层会遮住? 如果是的话,你可以试试我那方法。就是在iframe那一层放一个遮罩层。当拖动div的时候就让遮罩层显示出来把iframe遮住,这样就可以正常拖动了。