摘要: In this short post I will explain the difference between attributes and properties in HTML. The .prop() function introduced in jQuery 1.6 raised a lot 阅读全文
posted @ 2017-05-15 21:04 静候良机 阅读(294) 评论(0) 推荐(0) 编辑
摘要: 999img { /* ... */ vertical-align: text-bottom;} 阅读全文
posted @ 2015-02-06 17:40 静候良机 阅读(5778) 评论(0) 推荐(0) 编辑
摘要: 理所当然,jQuery出场:$(function() { $(window).scroll(function() { if($(this).scrollTop() + $(this).innerHeight() >= this.scrollHeight) { ... 阅读全文
posted @ 2015-02-04 17:42 静候良机 阅读(1521) 评论(0) 推荐(0) 编辑
摘要: CSS3新增text-overflow: ellipse; 只支持单行文本如果是多行文本, 在无法完全显示的情况下,可以按下面这样写:overflow:hidden;display: -webkit-box;-webkit-line-clamp: 2;-webkit-box-orient: vert... 阅读全文
posted @ 2015-02-03 22:38 静候良机 阅读(1366) 评论(0) 推荐(0) 编辑
摘要: 在手机浏览器中,长按可选中文本,但如果在应用中,会给人一种异样的感觉,最好还是禁用此功能为上。* { -webkit-touch-callout:none; -webkit-user-select:none; -khtml-user-select:none; -moz-user-select:non... 阅读全文
posted @ 2015-02-03 07:21 静候良机 阅读(27628) 评论(3) 推荐(1) 编辑
摘要: 1)div、span的区别,div默认是沾满一行,span默认是inline2)去除font之类的标签 阅读全文
posted @ 2015-01-28 19:26 静候良机 阅读(1205) 评论(0) 推荐(0) 编辑
摘要: 保证中文每行第一个字,不会出现标点符号p { white-space: pre-wrap;} 阅读全文
posted @ 2015-01-28 19:24 静候良机 阅读(1103) 评论(0) 推荐(0) 编辑
摘要: 基本1920x1080的手机,对于html5的页面来讲,获得的device-width,一般是420px,这个值是经过浏览器转换过的,与屏幕像素宽度不同A pixel is not a pixelhtml5页面中使用px,是经过转换的,一般是有多个screen像素组成一个html5页面像素,相当于a... 阅读全文
posted @ 2015-01-20 08:07 静候良机 阅读(725) 评论(0) 推荐(0) 编辑
摘要: 尽量少用position:relative做一个OTO项目时,页面上下滑动时,颤抖的很厉害;页面中主要是图片比较多,开始以为是图片多的原因,但是把所有图片都不加载,还是颤抖;后来,去掉所有外部的css,立即就好了,经过分析,CSS也都非常简单,只有position这个属性引起了我的注意,最后,注释掉... 阅读全文
posted @ 2015-01-19 23:09 静候良机 阅读(4608) 评论(0) 推荐(0) 编辑
摘要: Because I haven't enough votes, so post picture at here, thank you.Almost 2 weeks ago, I was searching How to change the text color of the statusbar t... 阅读全文
posted @ 2015-01-11 22:44 静候良机 阅读(3186) 评论(2) 推荐(0) 编辑