Различие, или возможно просто способ, которым я помню, когда я раньше создавался то же впечатление как исходный плакат, является этим: Java всегда является передачей значением. Все объекты (в Java, чем-либо за исключением примитивов) в Java являются ссылками. Эти ссылки передаются значением.
:focus
and :active
are two different states.
:focus
represents the state when the element is currently selected to receive input and :active
represents the state when the element is currently being activated by the user.For example let's say we have a . The
will not have any state to begin with. It just exists. If we use Tab to give "focus" to the
, it now enters its
:focus
state. If you then click (or press space), you then make the button enter its (:active
) state.
On that note, when you click on an element, you give it focus, which also cultivates the illusion that :focus
and :active
are the same. They are not the same. When clicked the button is in :focus:active
state.
An example:
edit: jsfiddle
:active Adds a style to an element that is activated
:focus Adds a style to an element that has keyboard input focus
:hover Adds a style to an element when you mouse over it
:lang Adds a style to an element with a specific lang attribute
:link Adds a style to an unvisited link
:visited Adds a style to a visited link
Source: CSS Pseudo-classes
: фокус - это когда элемент может принимать ввод - курсор в поле ввода или ссылка, на которую была сделана вкладка.
: активен, когда элемент активируется пользователем - время между нажатием кнопки мыши и ее отпусканием.