摘要: iframe引入flash引入 embed中间要加vmode="transparent"--> 阅读全文
posted @ 2014-02-16 21:28 joya 阅读(215) 评论(0) 推荐(0) 编辑
摘要: 参考文章:http://www.zhangxinxu.com/wordpress/2010/11/%E6%8B%9C%E6%8B%9C%E4%BA%86%E6%B5%AE%E5%8A%A8%E5%B8%83%E5%B1%80-%E5%9F%BA%E4%BA%8Edisplayinline-block%E7%9A%84%E5%88%97%E8%A1%A8%E5%B8%83%E5%B1%80/总结:display:inline-block:1、不规则的高度2、vertical-align:topfloat:left:1、高度相等,如果不相等,第二行的第一个元素会排到最高元素的右侧。 阅读全文
posted @ 2014-02-16 15:21 joya 阅读(164) 评论(0) 推荐(0) 编辑
摘要: 1、使用有语义的标签2、IMG标签中加上alt3、a标签中加上title4、meta中使用5、无障碍role的使用 阅读全文
posted @ 2014-02-16 15:14 joya 阅读(103) 评论(0) 推荐(0) 编辑
摘要: 文章来源:http://www.w3cplus.com/css/create-css-browers-hacks条件注释:http://www.w3cplus.com/create-an-ie-only-stylesheet条件注释:lt低于,lte低于等于,gt高于,gte高于等于常用Hack写法:IE6:div { _width:100px; }*html div { width:100px;}IE7:div{ +width:100px;}*+html div { width:100px;}*:first-child+html { width:100px; }IE6和... 阅读全文
posted @ 2014-02-16 15:01 joya 阅读(551) 评论(0) 推荐(0) 编辑
摘要: 方法一:单行文字height:50px;line-height:50px;text-align:center;方法二:绝对定位父元素{ position:relative; }子元素{ position:absolute; left:50%; top:50%; width:value; ... 阅读全文
posted @ 2014-02-16 14:28 joya 阅读(356) 评论(0) 推荐(0) 编辑
摘要: 文章来源: http://www.w3cplus.com/css/px-to-em总结: 1、浏览器默认的字体大小为16PX,即1em 2、EM可以指定小数点的后三位 3、元素自身没有设置字体大小,全部都按照以下公式计算 需要转换的像素值/父元素的font-size= em值 4、元素自身设置字体大小, 字体大小的计算方法不变: 需要转换的像素值/父元素的font-size= em值 其他,按以下公式计算: 需要转换的像素值/自身的font-size=em值 阅读全文
posted @ 2014-02-16 13:55 joya 阅读(256) 评论(0) 推荐(0) 编辑
摘要: 文章来源: http://www.zhihu.com/question/20394889总结: 1、line-height:2em、line-height:200% 根据父元素的字体大小计算行高 子元素继承父元素计算后的行高,如果子元素的字体很大,而父元素字体小,这样计算出来的行高有可能无法容量子元素的显示,会被截掉。 2、line-height:2(推荐) 根据子元素计算行高(取最大字体值*2) 阅读全文
posted @ 2014-02-16 13:50 joya 阅读(565) 评论(0) 推荐(0) 编辑
摘要: 文章来源:http://www.neoease.com/css-z-index-property-and-layering-tree/总结: 1、z-index只有在设置position:relative、absolute、fixed中才会生效; 2、设置position后,如果没有设置z-index,在IE6-7中z-index默认的是0,而标准浏览器中,z-index是auto; 3、如果没有设置z-index,后出现的元素覆盖前面的元素,如果设置了z-index,z-index下的子级高的覆盖子级低的元素; 4、设置了z-index,根据父亲的顺序来排列,无论子元素的z-inde... 阅读全文
posted @ 2014-02-16 13:45 joya 阅读(124) 评论(0) 推荐(0) 编辑
摘要: /*方法一(推荐)*/ .clearfix:before,.clearfix:after { content:''; display:table; } .clearfix:after { clear:both; overflow:hidden; } .clearfix { *zoom:1; } /*方法二*/ .clearfix:after { con... 阅读全文
posted @ 2014-02-16 13:34 joya 阅读(470) 评论(0) 推荐(0) 编辑