摘要: 浏览器究竟该采用哪种模式渲染呢?这就引出DTD,既是网页的头部声明,浏览器会通过识别DTD而采用相对应的渲染模式:1. 浏览器要使老旧的网页正常工作,但这部分网页是没有doctype声明的,所以浏览器对没有doctype声明的网页采用quirks mode解析。2. 对于拥有doctype声明的网页,什么浏览器采用何种模式解析,这里有一张详细列表可参考:http://hsivonen.iki.fi... 阅读全文
posted @ 2017-07-26 15:56 从你的世界路过 阅读(166) 评论(0) 推荐(0) 编辑
摘要: //中间内容的高度自适应$(function(){ var headerHeight = $(".header").get(0).offsetHeight; var footerHeight = $(".footer").get(0).offsetHeight; var minHeight = $(window).height() - headerHeight - footerH... 阅读全文
posted @ 2017-07-26 10:44 从你的世界路过 阅读(411) 评论(0) 推荐(0) 编辑
摘要: 获取高宽度 浏览器窗口可视区域大小 在不同浏览器都实用的 JavaScript 方案: var w= document.documentElement.clientWidth || document.body.clientWidth; var h= document.documentElement. 阅读全文
posted @ 2017-07-26 10:35 从你的世界路过 阅读(926) 评论(0) 推荐(0) 编辑
摘要: 2D变换方法:一般用于hover translate() rotate() scale() skew() matrix() 1、translate()方法 移动 translate()方法,根据左(X轴)和顶部(Y轴)位置给定的参数,从当前元素位置移动 实例 translate值(50px,100p 阅读全文
posted @ 2017-07-12 10:53 从你的世界路过 阅读(171) 评论(0) 推荐(0) 编辑
摘要: 在一个例子中使用所有过渡属性: div { transition-property: width;/*all*/ transition-duration:1s;/*0.6s*/ transition-timing-function: linear;/*ease*/ transition-delay: 阅读全文
posted @ 2017-07-12 10:52 从你的世界路过 阅读(435) 评论(0) 推荐(0) 编辑
摘要: 1、CSS3 @keyframes规则 @keyframes myfirst { from {background: red;} to {background: yellow;} } @-webkit-keyframes myfirst /* Safari and Chrome */ { from 阅读全文
posted @ 2017-07-12 10:48 从你的世界路过 阅读(1031) 评论(0) 推荐(0) 编辑
摘要: <script type="text/javascript"> // 处理页面高度过矮时底部出现空白问题 window.onload = function(){ //待页面所有图片加载完毕后再执行 jQuery(".footer").css({'display':'block'}); if (doc 阅读全文
posted @ 2017-02-27 16:49 从你的世界路过 阅读(2521) 评论(0) 推荐(0) 编辑
摘要: <script type="text/javascript"> var ua = navigator.userAgent; var ipad = ua.match(/(iPad).*OS\s([\d_]+)/), isIphone =!ipad && ua.match(/(iPhone\sOS)\s 阅读全文
posted @ 2017-02-27 16:47 从你的世界路过 阅读(13145) 评论(0) 推荐(0) 编辑
摘要: table{ width:100px; table-layout:fixed;/* 只有定义了表格的布局算法为fixed,下面td的定义才能起作用。 */ } td{ width:100%; word-break:keep-all;/* 不换行 */ white-space:nowrap;/* 不换 阅读全文
posted @ 2016-11-21 09:53 从你的世界路过 阅读(4294) 评论(0) 推荐(0) 编辑
摘要: jQuery操作复选框的选中和不选中状态非常简单,使用attr()来设置"checked"属性的值,true未选中,false为未选中,在整个全选、反选过程中注意处理全选复选框的选中状态,以及获取选中选项的值。 <ul id="list"> <li><label><input type="check 阅读全文
posted @ 2016-11-15 16:13 从你的世界路过 阅读(8573) 评论(0) 推荐(0) 编辑