For this article I want to present 50 handy CSS2/css3 code snippets for any web professional. These are perfect for storing in your development IDE of choice, or even keeping them saved in a small CSS file. Either way I am sure designers & developers can find some use for some of the snippets in this collection.@Jake Rocheleau
25
2015
05
13
2015
05
13
2015
05
13
2015
05
js最新手机号码、身份证正则表达式
正则表达式(regular expression)是一个描述字符模式的对象。使用正则表达式可以进行强大的模式匹配和文本检索与替换功能。
发布:博主 | 分类:JavaScript | 评论:0 | 浏览:
13
2015
05
13
2015
05
兼容主流浏览器的全站变灰CSS代码
html { -webkit-filter: grayscale(100%); -moz-filter: grayscale(100%); -ms-filter: grayscale(100%); -o-filter: grayscale(100%); filter:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg'><filter id='grayscale'><feColorMatrix type='matrix' values='0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0'/></filter></svg>#grayscalerayscale"); filter:progid:DXImageTransform.Microsoft.BasicImage(grayscale=1); zoom: 1; }
发布:博主 | 分类:转载 | 评论:0 | 浏览:
13
2015
05
js 判断iPhone|iPad|iPod|iOS|Android客户端
js 判断iPhone|iPad|iPod|iOS|Android客户端
if (/(iPhone|iPad|iPod|iOS)/i.test(navigator.userAgent)) { //alert(navigator.userAgent); window.location.href ="iPhone.html"; } else if (/(Android)/i.test(navigator.userAgent)) { //alert(navigator.userAgent); window.location.href ="Android.html"; } else { window.location.href ="pc.html"; };
发布:博主 | 分类:JavaScript | 评论:0 | 浏览:
12
2015
05
利用JQuery和Servlet实现跨域提交请求示例分享
这篇文章主要介绍了利用JQuery和Servlet实现跨域提交请求示例,需要的朋友可以参考下
原理:JavaScript的Ajax不可以跨域,但是可以通过向本地的一个Servlet发出请求,由Servlet完成跨域。再把远程的结构返回给客户端。这样Ajax就可以跨域了。在后面,再发一个PHP版本的,请大家关注啊。下面是代码
发布:博主 | 分类:转载 | 评论:0 | 浏览:
08
2015
05
jQuery 获取屏幕高度、宽度
做手机Web开发做浏览器兼容用到了,所以在网上找了些汇总下。 alert($(window).height()); //浏览器当前窗口可视区域高度 alert($(document).height()); //浏览器当前窗口文档的高度 alert($(document.body).height());//浏览器当前窗口文档body的高度 alert($(document.body).outerHeight(true));//浏览器当前窗口文档body的总高度 包括border padding margin alert($(window).width()); //浏览器当前窗口可视区域宽度 alert($(document).width());//浏览器当前窗口文档对象宽度 alert($(document.body).width());//浏览器当前窗口文档body的高度 alert($(document.body).outerWidth(true));//浏览器当前窗口文档body的总宽度 包括border padding margin // 获取页面的高度、宽度 function getPageSize() { var xScroll, yScroll; if (window.innerHeight && window.scrollMaxY) { xScroll = window.innerWidth + window.scrollMaxX; yScroll = window.innerHeight + window.scrollMaxY; } else { if (document.body.scrollHeight > document.body.offsetHeight) { // all but Explorer Mac xScroll = document.body.scrollWidth; yScroll = document.body.scrollHeight; } else { // Explorer Mac...would also work in Explorer 6 Strict, Mozilla and Safari xScroll = document.body.offsetWidth; yScroll = document.body.offsetHeight; } } var windowWidth, windowHeight; if (self.innerHeight) { // all except Explorer if (document.documentElement.clientWidth) { windowWidth = document.documentElement.clientWidth; } else { windowWidth = self.innerWidth; } windowHeight = self.innerHeight; } else { if (document.documentElement && document.documentElement.clientHeight) { // Explorer 6 Strict Mode windowWidth = document.documentElement.clientWidth; windowHeight = document.documentElement.clientHeight; } else { if (document.body) { // other Explorers windowWidth = document.body.clientWidth; windowHeight = document.body.clientHeight; } } } // for small pages with total height less then height of the viewport if (yScroll < windowHeight) { pageHeight = windowHeight; } else { pageHeight = yScroll; } // for small pages with total width less then width of the viewport if (xScroll < windowWidth) { pageWidth = xScroll; } else { pageWidth = windowWidth; } arrayPageSize = new Array(pageWidth, pageHeight, windowWidth, windowHeight); return arrayPageSize; } // 滚动条 document.body.scrollTop; $(document).scrollTop();
发布:博主 | 分类:Html5 | 评论:0 | 浏览:
23
2015
04
mysql导入数据时 USING BTREE 错误解决办法
今天在往测试数据库导入数据时,其中一个供应商表报USING BTREE 错误:You have an error in your SQL syntax; check the
manual that corresponds to your MySQL server version for the right syntax to use
发布:博主 | 分类:转载 | 评论:0 | 浏览: