Veravore
Lady Saxophone
▧▧▧ ♬ ▧▧▧
Just more nit-picking... ninja
It's technically called a "psuedo", not a selector (specifically "psuedo-class", but most people use "psuedo" for short)
If you're curious about psuedos though, there are plenty of others you can use on Gaia profiles.
Most commonly, people use :hover, :before, :after, and :nth-child() ones.
[ MDN Article ]
▧▧▧▧▧▧▧
It's all good! I actually learned something so, it was worth both yours and my own time, I'd say.
3nodding
Knight Yoshi
This is what I found based on "Pseudo-classes" on w3schools;
CSS Pseudo Classes
I learn a lot from w3schools, but new references are also nice.
Wrong. The transition does not have to be declared in both the original and hover state. It's only required to be in the original state of the element - unless you are explicitly changing something, the timing function, delay, etc.
Also :before and :after are not pseudo-classes, they are pseudo-elements.
@OP~ I recommend
not linking to W3Schools as it's not the best place for reliable information. You should use the MDN, Mozilla Developer Network.
Also if you're going to use transition in your example, don't just use
1s. As omitting any value in a shorthand property uses the initial value for the explicit property. Show users what properties are changing in the transition explicitly instead of using the implied initial value,
all.
I've found w3schools to be quite informational myself, but I don't generally use 1 reference, I usually try cross-reference Guides/Tutorials/Documentations.
Also; could you maybe dumb that down for me? About using the transition in my example, I'm fairly newer to this, but I have a general idea. I mean, I could be more informational, as to imply what "s" is, maybe make it "1.0s"...? and so on, but otherwise I'm clueless o.o
I believe Fredy-San pointed out to me that I only needed it in the initial panel being effected, as-well.
I'll just say that I, as a web developer, nor any other developer I know would reference W3Schools. Lol.
Really the only needed sources would be the W3C, World Wide Web Consortium, which makes most of the standards used on the web. However, they get too technical in the sense that they go beyond CSS property name, use, values. They also cover how browsers should implement it, so for someone with less experience, that's going to be overwhelming. So you can go to the MDN, Mozilla Developer Network, as I mentioned and just review a CSS properties name, use, values, initial value, and so on - essentially just the stuff you need to know.
Okay, so the
transition property is a shorthand for
transition-delay, transition-duration, transition-property, transition-timing-function. If you omit any value that's used in the explicit property it uses the explicit property's initial value, it's default value. So if you say
transition: 1s, all you're really declaring is the transition-duration, the amount of time it should take for the transitions to happen, in the shorthand.
So all properties that can be transitioned will change with the same duration.