.action { background-color: #0f766e; } .action:hover { background-color: #115e59; }The colour becomes darker only while the button is hovered.
LESSON 81 OF 100
Provide visual feedback when a pointing device hovers the button.
The :hover pseudo-class selects an element under the pointer or one containing the pointed element. It is additional pointer feedback, not the only way to communicate an action.
.action { background-color: #0f766e; } .action:hover { background-color: #115e59; }The colour becomes darker only while the button is hovered.
.action { background-color: #115e59; }Changing the base rule does not describe an interactive state and applies permanently.
Keep the base background and set #115e59 only for .action:hover.
The base selector establishes the normal appearance, while the pseudo-class adds the difference only in the hovered state.
ANALYSIS REQUEST
The initial discussion is without obligation. You receive an honest recommendation, suitable stages and the factors that affect price.