The :read-only selector selects elements which are "readonly". Form elements with a "readonly" attribute are defined as "readonly".

:read-only {
    css declarations;
}
input:read-only {
   border:1px solid #3366ff;
   background: #ffff99;
}

Click the button below to experiment with this selector.

Give it a Try!

NoFirefox NoExplorer YesChrome YesSafari YesOpera