div css网站布局的八个小技巧
1.若有疑问立即检测
在出错时若能对原始代码做简单检测可以省去很多头痛问题。W3C对于XHTML与CSS 都有检测工具可用,请
见 http://validator.w3.org 。请注意,在文件开头的错误,可能因为不当的结构等因素造成更多错误;我们建议先修正一些最明显的
错误之后重新检测,这样也许会让错误数量爆减。
2.使用浮动功能时记得适当清除指令
浮动是个危险的功能,未必会产生您所期望的结果。如果您遇到浮动元素延伸到外围容器的边框或者其他不正常情况,请先确定您的做法是正确的。请参阅52CSS.com网站上的教学。
3.边界重合时利用padding或border来避免
您可能会为了一点不应该出现的空间而焦头烂额,或者您需要一点点空间时,怎样都挤不出来。如果您有用到margin,那么很容易产生边界的重合。
4.尝试避免同时对元素指定padding/border以及高度或宽度
Windows版IE经常导致width与height的计算问题。有些方法可以解决此问题,但如果母元素需要指定高度与宽度时,最好能够在母元素之内的子元素套用margin,或者当子元素需要指定高度与宽度时,在母元素套用padding以达效果 ......
盒子标签和属性对照
CSS语法(不区分大小写)
JavaScript语法(区分大小写)
border
border
border-bottom
borderBottom
border-bottom-color
borderBottomColor
border-bottom-style
borderBottomStyle
border-bottom-width
borderBottomWidth
border-color
borderColor
border-left
borderLeft
border-left-color
borderLeftColor
border-left-style
borderLeftStyle
border-left-width
borderLeftWidth
border-right
borderRight
border-right-color
borderRightColor
border-right-style
borderRightStyle
border-right-width
borderRightWidth
border-style
borderStyle
border-top
borderTop
border-top-color
borderTopColor
border-top-style
borderTopStyle
border-top-width
borderTopWidth
border-width
borderWidth
clear
clear
float
floatStyle
margin
margin
margin-bottom
marginBottom
margin-left
marginLeft
margin-right
marginRight
margin-top
marginTop
padding
padding
padding-bottom
paddingBottom
padding-left
paddingLeft
padding-right
paddingRight
padding-top
padding ......
介于纯粹CSS的无图片圆角实在是代码太乱,还是倾向于利用图片结合CSS来自做圆角;
(1)高宽皆自适应:
.roundedcornr_box_510746 {
background: #dddddd url(roundedcornr_510746_grad.gif) repeat top left;width:300px;
}
.roundedcornr_top_510746 div {
background:transparent url(roundedcornr_510746_tl.gif) no-repeat top left;
}
.roundedcornr_top_510746 {
background:transparent url(roundedcornr_510746_tr.gif) no-repeat top right;
}
.roundedcornr_bottom_510746 div {
background:transparent url(roundedcornr_510746_bl.gif) no-repeat bottom left;
}
.roundedcornr_bottom_510746 {
background:transparent url(roundedcornr_510746_br.gif) no-repeat bottom right;
}
.roundedcornr_top_510746 div, .roundedcornr_top_510746,
.roundedcornr_bottom_510746 div, .roundedcornr_bottom_510746 {
width: 100%;
height: 30px;
font-size: 1px;
}
.roundedcornr_content_510746 { margin: 0 30px; }
-->
< ......
这个bug,主要是一个二级菜单,在ie7中hover时正常显示出来,在ie6下没有效果。在网上找了很多资料,弄了好几天,最终是参照别人的代码,用的纯css经过自己的整理,就把它给弄下来了。希望以后自己多来看看。
如下:
-------------------
css代码:
.allMenu
{
width: 894px;
height: 22px;
line-height: 22px;
margin: 7px 3px 1px 3px;
background: url(images/menubg.GIF) repeat-x top left;
}
.allMenu .select
{
padding: 0px;
margin: 0px;
white-space: nowrap;
list-style-type: none;
}
.allMenu LI
{
height: auto;
padding: 0px;
float: left;
margin: 0px;
}
.allMenu .select A
{
height: 22px;
padding: 0 20px 0 20px;
display: block;
float: left;
......
FLASH播放器控件相关属性方法说明。
2008-07-03 18:19
AlignMode (读写)
语法:AlignMode As Long
说明:对齐方式(与 SAlign 属性联动)。当控件的 长宽比例与影片不一致且 WMode 不为 ExactFit 时,影片
(没有被放大的)在控件中显示的位置可用该属性调整。 该属性值由标志位组成。如图,将该属性值(二进制)中相 应的位标记为 1 就设置了相应的对齐方向。
属性值与相应的对齐方式(后面括号里是二进制数)
1:左对齐(0001) 2:右对齐(0010) 4:顶对齐
(0100) 8:底对齐(1000)
也可以组合各种对齐方式,同时将两个或以上的位标 记为 1 ,也就是将这四个基本值组合相加。比如同时左对齐 和顶对齐,属性值则设为 5(0101)。
例子 : 设置影片为右对齐 :
movie.AlignMode = 2
2.BackgroundColor(读写) 语法:BackgroundColor As Long 说明:影片的背景色(与 BGColor 联动)。以(红
× 65536 +绿× 256 +蓝)计算颜色值。红绿蓝颜色取 值范围(0-255 )。默认的影片背景色为 -1 。如果影片 设置了底色或有图片当作背景,那么看不出来该属性值的 改变会有什么影响 。
例子:将影片背景色设为蓝色 :
movie.Backgroun ......
1.什么是函数,函数的两种定义方式
2.参数,传值和传址,默认参数、参数访问信息和变长参数
3.函数的变量(全局和局部)
4.代理函数对象和函数执行队列
5.返回函数类型和闭包
6.apply的应用(方法劫持,继承属性)
下载地址:as3_4函数 ......