Web

Pseudo-class (:hover)

Në shqip: Pseudo-klasë

ShpjegimiSQ

Pseudo-klasa e stilon një element vetëm në një gjendje të caktuar — :hover kur kalon mausi sipër, :focus kur zgjidhet me tastierë, :first-child kur është i pari. Kështu butonat „reagojnë“ pa JavaScript.

EnglishEN

A pseudo-class styles an element only in a certain state — :hover when the mouse is over it, :focus when it's selected with the keyboard, :first-child when it's the first one. That's how buttons “react” without JavaScript.

Si ta mendosh

Si drita e korridorit me sensor: ndizet vetëm kur kalon dikush — ndryshe qëndron e fikur.

Lexoje në anglisht

Like a hallway light with a sensor: it switches on only when someone walks past — otherwise it stays off.

Shembull kodicss

.butoni:hover  { background: crimson; }
input:focus    { outline: 2px solid blue; }
li:first-child { font-weight: bold; }

Terma të lidhur