相关标签

YUI Grids CSS 解读

YUI 中的 Grids CSS 主要有三个部分值得大家关注和学习:
1、布局的思想:使用 “负 margin(Negative Margins)” 技术
详细可参阅:《Creating Liquid Layouts with Negative Margins》
2、使用 em :当用户改变字体大小时,宽度同时改变。
技巧:用 13 像素来平分宽度(保留小数到千分位),而 IE 浏览器用 13.333 。

/* 750 centered, and backward compatibility */
#doc {
width:57.69em;
*width:56.251em;
min-width:750px;
}

57.69 = 750 / 13
56.251 = 750 / 13.333

注:《Setting Page Width with YUI Grids》 一文中提到:IE 下的 em 是宽度除以 13 ,再乘以 .9759 得到。同解于为什么现在的 YUI 源码中 IE 下 750px [...]

... 16 条评论 »

YUI: Effects Widgets

YAHOO.widget.Effects 基于 YUI 实现的 Effects 库,记录一下。
http://blog.davglass.com/files/yui/effects/
用这个库可以很好的改善网站某些视觉效果,当然使用适当为上,画龙点睛即可。

... 4 条评论 »