It is not possible with inline styles, but the (in)famous onmouseover / onmouseout event handler can do the same thing.
Caveat: CSS definitions with hyphens have to be translated to Javascript using camelCase, like (css)background-color = (javascript)backgroundColor