1
4

1 回答 1

0

You're assuming that lower placement in the stylesheet means higher priority. In CSS, the more specific the selector, the higher priority. There are many other factors that determine priority, but in your case this should work -

Just use a more specific selector for the disabled class:

input[type="button"].login_selection_button.gen-btn-disabled{
    /* disabled styles here */
}

And as Zeta pointed out, applying specific styles generically can lead to unwanted effects. I suppose my observation was more that the padding and font sizes were different and by selectors, the first declaration would take priority no matter where the disabled style was defined.

于 2012-12-03T21:31:49.437 回答