
CSS3+H5
妖月风
这个作者很懒,什么都没留下…
展开
-
绝对定位的div居中
.div1{width:300px;height:300px;background:green;margin: auto;position:absolute;left:0;right:0;top:0;bottom:0;}原创 2016-04-04 20:47:25 · 348 阅读 · 0 评论 -
html5 geolocation/ 百度地图api Geolocation 定位当前城市信息
1、根据当前所处位置 定位所在城市信息 js 百度 geolocation 定位当前城市 var geolocation = new BMap.Geolocation(); var gc = new BMap.Geocoder(); geolocation.getCurrentPosition( function(r) { //定位结果对象会传递给r变量转载 2016-05-23 17:16:35 · 12958 阅读 · 1 评论 -
Access-Control-Allow-Origin 跨域问题
Font from origin 'http://design.ehaoyao.com' has been blocked from loading by Cross-Origin Resource Sharing policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin转载 2016-12-21 11:54:09 · 578 阅读 · 0 评论 -
跨域CORS原理及调用具体示例
跨域介绍方案—CORS。 相对JSONP,CORS支持POST提交,并且实施起来灰常简单,CORS原理只需要向响应头header中注入Access-Control-Allow-Origin,这样浏览器检测到header中的Access-Control-Allow-Origin,则就可以跨域操作了。 具体实现如下: 前台使用普通的Ajax提交方式,跟普通访问一样,无需更改。 $.ajax({转载 2016-12-21 15:58:36 · 604 阅读 · 0 评论