CSS hack:区分IE6,IE7,firefox
区别IE6与FF:
background:orange;*background:blue;
区别IE6与IE7:
background:green !important;background:blue;
区别IE7与FF:
background:orange; *background:green;
区别FF,IE7,IE6:
background:orange;*background:green !important;*background:blue;
注:IE都能识别*;标准浏览器(如FF)不能识别*;
IE6能识别*,但不能识别 !important,
IE7能识别*,也能识别!important;
FF不能识别*,但能识别!important;
IE6
IE7
FF
*
√
√
×
!important
×
√
√
IE6
IE7
FF
*
√
√
×
!important
×
√
√
IE6
IE7
FF
*
√
√
×
!important
×
√
√
IE6
IE7
FF
*
√
√
×
!important
×
√
√
另外再补充一个,下划线"_",
IE6支持下划线,IE7和firefox均不支持下划线。(推荐)
于是大家还可以这样来区分IE6,IE7,firefox
: background:orange;*background:green;_background:blue;
注:不管是什么方法,书写的顺序都是firefox的写在前面,IE7的写在中间,IE6的写在最后面。
相关文档:
1. CSS字体定义简写规则
一般的写法会是这样:
font-weight: bold;
font-style: italic;
font-varient: small-caps;
font-size: 1em;
line-height: 1.5em;
font-family: verdana,sans-serif
而实际上你可以用更简洁的写法:
font: bold italic small-caps 1em/1.5em verdana,sans-serif
是不是更省事?不过使用这 ......
CSS中的光标类型
语法:
cursor : auto | all-scroll | col-resize| crosshair | default | hand | move | help | no-drop | not-allowed | pointer | progress | row-resize | text | vertical-text | wait | *-resize | url ( url )
取值:
auto
:
默认值。浏览器根据当前情况自动确定鼠标光标类型。
......
IE 浏览器中 CSS 特性的最大的问题:会反复执行,每秒钟可能执行了成百上千次,有严重的性能问题。
如何对 CSS 进行优化呢?
至少:如果我们将 CSS 在匹配的元素中仅执行一次,性能将会提升很大。
&nb ......
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE> New Document </TITLE>
<META NAME="Generator" CONTENT="EditPlus">
<META NAME="Author" CONTENT="">
<META NAME="Keywords" CONTENT=""& ......
一直在想用css怎么做下拉菜单,之前看到的下拉菜单都是用js做的,可是又不懂js,今天终于用css研究出来了,大家指教指教。
下面的代码直接考了就行。
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org ......