摘要: Transform 常用几项属性transform-origin 定义旋转的中心点 IE9+chrome safari firefox opera支持transform 对元素进行移动,缩放,转动,拉长或拉伸 IE9+chrome safari firefox opera支持例子transform-origin : X: left|center|right|length|% Y: top|center|bottom|length|% Z: lengthtransform:roate(angle) angle单位为degtransform:skew... 阅读全文
posted @ 2014-02-19 11:42 _彭建 阅读(286) 评论(0) 推荐(0) 编辑
摘要: User Interface 常用几项属性box-sizing 定义盒子模型 IE8+ chrome safari firefox opera支持 bootstrap grid 系统采用appearance 定义对象外观 chrome safari firefox支持user-select 控制文本是否可以选择 chrome safari firefox支持resize 对象的区域是否允许用户调尺寸 chrome safari firefox支持例子box-sizing:... 阅读全文
posted @ 2014-02-18 11:32 _彭建 阅读(231) 评论(0) 推荐(0) 编辑
摘要: 语法:@media::[[',']*]?:[only | not]?[and]* |[and]*:'('[:]?')'CSS2定义的媒体类型Media Types媒体类型CSS Version版本Compatibility兼容性Description简介 all CSS2所有浏览器用于所有媒体设备类型 aural CSS2Opera用于语音和音乐合成器 braille CSS2Opera用于触觉反馈设备 handheld CSS2Chrome,Safari,Opera用于小型或手持设备 print ... 阅读全文
posted @ 2014-02-13 15:10 _彭建 阅读(200) 评论(0) 推荐(0) 编辑
摘要: 先看一个实例实例直线两点之间的距离L(A,B)L=√[(B.x-A.x)2+(B.y-A.y)2]=√[4900+2500]=86.023直角三角形勾股定理AC2 = AB2+ BC2 //最好的例子就是勾3股4弦5sinΦ = BC/AC //正玄函数对边比斜边cosΦ = AB/AC //余弦函数邻边比斜边tanΦ = BC/AB //正切函数对边比邻边cotΦ = AB/BC //余切函数邻边比对边单位圆单位圆是指半径为1的圆形正玄sinΦ = BC/AC 可转换为 sinΦ = BC/1 = BC // Y轴距离余弦cosΦ = AB/AC 可转换为cosΦ = AB/1 = AB . 阅读全文
posted @ 2014-02-08 11:37 _彭建 阅读(193) 评论(0) 推荐(0) 编辑
摘要: jQuery扩展基本写法://jQuery.fn.extend 和 $.fn.extend都是可以的.jQuery.fn.extend({alert:function(){ alert($(this).html()); return $(this);},empty:function(){} $(this).html(''); return $(this);});如何使用jQuery扩展1234545678$('#mydiv').alert();$('#mydiv').empty();制作第一个jQuery插件slider在线预览HTML代码 1 阅读全文
posted @ 2014-01-24 12:54 _彭建 阅读(372) 评论(0) 推荐(0) 编辑
摘要: css hack主要分为3种IE条件注释(推荐)? IE ?]>HTML代码块keywords ? 问号表示可有可无,如没有keywords表示是否为IE或者IE那个版本keywords关键字有: gt(大于), lt(小于), gte(大于等于), lte(小于等于), !(非);version ?问号表示可有可无,如果有指定IE的版本,一般从6开始.小于等于IE7,test类字体颜色为红色.css属性hackdiv{width: 500px; *width:300px; /* for ie7/ie6 */_width:200px; /* for ie6 */}p{color:red 阅读全文
posted @ 2014-01-20 17:57 _彭建 阅读(173) 评论(0) 推荐(0) 编辑
摘要: JavaScript 是弱类型语言变量在条件语句中会根据期望值自动转换.关系运算false,'',null,undefined,0,NaN这6个在关系运算是都等于false其中 NaN (Not a number) 比较奇特, NaN ==false 结果为false, !!NaN转换结果是false;逻辑运算逻辑运算符号+,-,*, /,%-,*,/ 期望值都为数字,如果有一个或者两个不是数字,结果将是NaN+ 不一样, 只要两个运算值中有一个或者两个值为字符串,将作为连接符号使用.两个值都是数值时才执行加运算.5 +'5' // '55' f 阅读全文
posted @ 2014-01-19 22:16 _彭建 阅读(220) 评论(0) 推荐(0) 编辑
摘要: 第一章认识JavaScriptJavaScript特性: 1.面向对象编程的语言.function Person(name,age){ this.name = name; this.age = age;}Person.prototype.getName = function(){ return this.name;};Person.prototype.getAge = function(){ return this.age;};var p1 = new Person('John',30);var p2 = new Person('Bob',40);console 阅读全文
posted @ 2014-01-18 17:21 _彭建 阅读(134) 评论(0) 推荐(0) 编辑
摘要: 变量变量是存储数据的容器变量的定义与赋值JavaScript变量名区分大小写var name; //只声明var age = 20; //声明并赋值var dog = 10; // dog 和 Dog 和 DOG 不相等单var声明模式var a,b='apple',c =10; //单var关键字,多变量var age = 28, name = 'Bob', fly = true;变量的类型var undef = undefined; // undefined类型var num = 10; // number 类型var str = 'tree' 阅读全文
posted @ 2014-01-18 11:57 _彭建 阅读(186) 评论(0) 推荐(0) 编辑
摘要: Selection对象,表示当前激活的高亮文本选区.Selection对象获取标本浏览器 : window.getSelection();IE : document.selection;兼容代码:var selection = window.getSelection ? window.getSelection() : document.selection;Selection对象取消选区if(selection.removeAllRanges){ selection.removeAllRanges();} else{ selection.empty();} 阅读全文
posted @ 2014-01-12 13:20 _彭建 阅读(240) 评论(0) 推荐(0) 编辑