Buenas tardes,
I want to change my color <a href=""></a>
but I can't do it
CSS code:
a:hover{
color: #fff;
}
but it changes the color when hovering the mouse over the link but I can't make it change color without hovering
Buenas tardes,
I want to change my color <a href=""></a>
but I can't do it
CSS code:
a:hover{
color: #fff;
}
but it changes the color when hovering the mouse over the link but I can't make it change color without hovering
You could do something like this:
We use the statement:
To indicate the color Black , to the element of type
<a>
.We use the statement:
To indicate the color Red , to the elements of type
<a>
, when the mouse hovers over them.Update
We use the statement:
To indicate the Blue color , to the elements of type
<a>
, when you click on them with the mouse. That is, when clicked.Update 2
If you want to do everything in a single line (although it is not highly recommended because you could not centralize the design in another file) .
You could do something like this:
Although this would only work for color in general , but not for events
hover
oractive
.You just have to remove the
:hover
one that indicates that it is a style that must be applied when hovering over the mouseChange color without mouse hover:
Further reference on CSS Link: CSS Styling