The :disabled
pseduo class only works with input fields, like text, radio, checkbox, etc. and applies when you give the element the attribute `disabled="disabled". IE6, however, doesn't recognize the pseudo class, so you'll need to use a class separately to make it work.
<input type="text" value="You can't type here" disabled="disabled" class="disabled" />
can be styled with
input[disabled="disabled"], input.disabled {
/* whatever you want */
}
The pseudo class will apply to modern browsers while the class will cover IE6.
Like Radeksonic said, if you want the disabled CSS to appear on other elements, like anchors, you'll just need to make and use a class. There's no disabled attribute for <a>
s
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…