弹出详情
2.css
#myFrameId{ width:800px; height:600px; position: absolute; display:none;} 3.js
function detail(id){ $('#myFrameId').attr('src','https://HdhCmsTestbaidu测试数据'); $('#myFrameId').show(); iframe_height = $(window).height()-600; iframe_width = $(document).width()-800; iframe_height>0?iframe_height=(iframe_height/2):iframe_height=0; iframe_width>0?iframe_width=(iframe_width/2):iframe_width=0; $('#myFrameId').css('top',iframe_height); $('#myFrameId').css('left',iframe_width);}$(document).on("click", function(e){ console.log('123'); $('#myFrameId').hide();});$(".myFrameId,.info_show").on("click", function(e){ console.log('456'); e.stopPropagation();});
查看更多关于弹出居中iframe窗口,点击其它位置消失_html/css_WEB-ITnose的详细内容...
声明:本文来自网络,不代表【好得很程序员自学网】立场,转载请注明出处:http://haodehen.cn/did114017