html5, is there a reason why :hover works in CSS, but it doesn't work if I type :hover in one space?

Asked 2 years ago, Updated 2 years ago, 46 views

For example,

1.

transform: rotate(10deg); }

2.

transform: rotate(10deg); }

I can do number one, but not number two. It hasn't been long since I learned coding, but I think it worked even with one space at a time, but it doesn't work. If there is a representative case where the original function is not applied properly if you open one space other than hover, it would be very helpful if you could answer that additionally. Thank you.

html5 css

2022-09-22 21:57

1 Answers

:hover itself is the name of the selector for the state in which the mouse is raised^

The name of the selector cannot contain spaces.


2022-09-22 21:57

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.