如何实现简单带有指向点击处箭头的说明窗口 效果类似于iPhone中的PopView:考虑用弹出浮动div的方法,但是不知道有没有什么正统方案?谢谢 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 <!DOCTYPE HTML><html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>无标题文档</title><style type="text/css">body{ font:12px "宋体";}#aa{cursor:pointer;}#bb{display:none;color:#000;border:1px solid #000;background-color:#ccc;width:100px;height:100px;}#bb span{width:30px;height:30px;line-height:30px;text-align:center;background-color:#fff;display:block;float:left;margin:0 10px;cursor:pointer;}</style><script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js"></script><script type="text/javascript">$(document).ready(function(){ $("#aa").click(function(){ $("#bb").css("display","block"); }); $("#ok").click(function(){ $("#aa").fadeOut(500); $("#bb").fadeOut(500); }); $("#no").click(function(){ $("#bb").fadeOut(500); });});</script></head><body><div id="aa">请点击我</div><div id="bb"><span id="ok">确定</span><span id="no">取消</span></div></body></html> 点击事件时判断鼠标点击的位置,然后将DIV框位置和鼠标位置设置相同,通常用event.clientX和event.clientY获取鼠标坐标,当然这个是屏幕位置,如果有滚动条且滚动需要加上相对位移,这个你可以网上搜索下相关文章解决。 求解,关于纯js写的图片轮流切换问题 ff中,return false不起作用? 关于JQuery弹出层代码的使用问题 Javascript defer 顺序测试,大家可以写下预料的答案。 jspsmart上传图片遇到新问题 求教一个关于JS返回值得问题 如何判断光标是在文本框中字符串在第一个字符的前面,还是最后一个字符的后面,有用立即给分. 如何验证输入的日期合法? 在一段折叠的代码里面如何让一两项出现就是展开的 到底什么是帧?怎么定义的? Javascript Quiz 求助大家一个很小白的问题
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>无标题文档</title>
<style type="text/css">
body{ font:12px "宋体";}
#aa{cursor:pointer;}
#bb{display:none;color:#000;border:1px solid #000;background-color:#ccc;width:100px;height:100px;}
#bb span{width:30px;height:30px;line-height:30px;text-align:center;background-color:#fff;display:block;float:left;margin:0 10px;cursor:pointer;}
</style>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$("#aa").click(function(){
$("#bb").css("display","block");
});
$("#ok").click(function(){
$("#aa").fadeOut(500);
$("#bb").fadeOut(500);
});
$("#no").click(function(){
$("#bb").fadeOut(500);
});
});
</script>
</head>
<body>
<div id="aa">请点击我</div>
<div id="bb"><span id="ok">确定</span><span id="no">取消</span></div>
</body>
</html>