jqery和js获取页面高度,滚动条高度

摘要: 网页可见区域宽: document.body.clientWidth网页可见区域高: document.body.clientHeight网页可见区域宽: document.body.offsetWidth (包括边线的宽)网页可见区域高: document.body.offsetHeight (包... 阅读全文
posted @ 2015-08-14 10:16 吹散的云 阅读(1545) 评论(0) 推荐(0) 编辑

js 时间函数

摘要: 1 var myDate = new Date(); 2 myDate.getYear(); //获取当前年份(2位) 3 myDate.getFullYear(); //获取完整的年份(4位,1970-????) 4 myDate.getMonth(); //获取... 阅读全文
posted @ 2015-08-08 09:26 吹散的云 阅读(192) 评论(0) 推荐(1) 编辑

css命名规则

摘要: 头:header 内容:content/container 尾:footer 导航:nav 侧栏:sidebar栏目:column 页面外围控制整体布局宽度:wrapper 左右中:left right center 登录条:loginbar 标志:logo 广告:banner ... 阅读全文
posted @ 2015-08-07 19:02 吹散的云 阅读(84) 评论(0) 推荐(1) 编辑

jquery 清除嵌入式样式

摘要: 1 /*有些页面样式不规范,没有写在一个class里,例如:2 */3 4 //这种情况下清空style可以removeAttr()方法移除style属性来实现5 6 $("#show").removeAttr("style"); //ie,ff均支持7 8 $("#show").attr("st... 阅读全文
posted @ 2015-08-05 22:05 吹散的云 阅读(300) 评论(0) 推荐(1) 编辑

js如何连接方法名

摘要: 有时候,我们会遇到下面这种情况1 var m='getElementById';2 document.m/*这是不合适的,因为在js中.后面代表的是一种方法,而js中是没有m方法的*/3 document+m/*这也是不合适的,js中+是连接两个字符串,这样最后生成的就是一个字符串了*/4 docu... 阅读全文
posted @ 2015-08-03 10:23 吹散的云 阅读(385) 评论(0) 推荐(1) 编辑

子元素float后,防止父元素塌陷的方法

摘要: A在浮动元素后加个div设置clear: both; height:0,overflow:hiddenB使用clearfix;用于父元素上1 .clearfix:after {2 content: " ";3 display: block;4 clear: both;5 height... 阅读全文
posted @ 2015-08-02 23:01 吹散的云 阅读(518) 评论(0) 推荐(0) 编辑

Bootstrap基于移动设备开发,需要在meta标签中写什么

摘要: 1 2 3 4 1 2 3 4 5 阅读全文
posted @ 2015-08-02 15:09 吹散的云 阅读(550) 评论(0) 推荐(0) 编辑

多行文字垂直居中

摘要: 明天写 阅读全文
posted @ 2015-08-01 00:26 吹散的云 阅读(86) 评论(0) 推荐(0) 编辑

防止点击页面中文字被选中

摘要: //在body中加入 onselectstart="return false;" 阅读全文
posted @ 2015-07-31 23:54 吹散的云 阅读(166) 评论(0) 推荐(1) 编辑

js和jquery中嵌套(点击)事件中,防止点击多次父事件,子事件执行多次

摘要: 1 $("#a").bind("click",function(){ 2 alert('a'); 3 $("#b").bind("click",function(){ 4 alert('b'); 5 }) ; 6 }); 7 /*这样连续点击a按钮后... 阅读全文
posted @ 2015-07-31 23:50 吹散的云 阅读(1538) 评论(1) 推荐(2) 编辑