Internet Explorer CSS hacks
测试环境:IE6 , IE7, IE8, FF3.0
表达方式:表达方式:
body { `background:red }
body { ~background:red }
body { !background:red }
body { @background:red }
body { #background:red }
body { $background:red }
body { %background:red }
body { ^background:red }
body { &background:red }
body { *background:red }
body { (background:red }
body { )background:red }
body { =background:red }
body { +background:red }
body { [background:red }
body { ]background:red }
body { {background:red }
body { |background:red }
body { ,background:red }
body { <background:red }
body { .background:red }
body { >background:red }
body { /background:red }
body { ?background:red }
结论:IE识别所有CSS Hack 结论:IE识别所有CSS Hack
比如我们要实现在IE 中480px 的宽度,而在其他浏览器500px 的宽度,就可以通过Hack 来完成,如下:比如我们要实现在IE中480px的宽度,而在其他浏览器500px的宽度,就可以通过Hack来完成,如下:
#hack {
width : 500px;
+width : 480px; /*only IE*/
}
相关文档:
CSS可以处理高度、宽度、深度三个维度。在前面的课程中,我们已经了解了前两个维度。在本课中,我们将学习如何令不同元素具有层次。简言之,就是关于元素堆叠的次序问题。
为此,你可以为每个元素指定一个数字(z-index)。其原理是:数字较大的元素将叠加在数字较小的元素之上。
比方说,我们正在打扑克,并且拿了一手同 ......
今天刚弄的,呵呵
index.asp
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-T ......
IE6.0、IE7.0 与FireFox CSS兼容的解决方法
2009-04-29 14:51
1.DOCTYPE 影响 CSS 处理
2.FF: div 设置 margin-left, margin-right 为 auto 时已经居中, IE 不行
3.FF: body 设置 text-align 时, div 需要设置 margin: auto(主要是 margin-left,margin-right) 方可居中
4.FF: 设置 padding 后, div 会增加 height 和 ......
IE6实现方法:
HTML部分:
<imgsrc="..."alt="..."onload="resizeImage(this)"/>
JS部分:
<mce:scripttype="text/javascript"><!--
functionresizeImage(obj){
obj.width=obj.width>50&&obj.width>obj.height?50:auto;
obj.height=obj.height>50?50:auto;
}
// -->&l ......
几乎 Menu 控件外观的各个方面都可以使用 Menu 控件的属性或级联样式表 (CSS) 来管理。通过了解哪些属性控制呈现的哪些方面,可以定制菜单的外观。本主题介绍由 Menu 控件公开的样式类型,并建议一些使用 Menu 控件设置样式的最佳做法。
可以直接在标记中设置各种样式的属性或使用样式表 ......