This is the style of the navigation bar made before p after. Now I want to add a hover style to the page number of the current page.
If I use js to control the dom, I will only change the background color of the middle p. I don’t know how to use the dom to operate the before and after styles.
So I wonder if I can use js to add an effect to p to make it look like it is always in the hover state.
The style when hovering is written, and the entire parallelogram can change color.
巴扎黑2017-07-05 10:58:42
Use js to add a class
to the DOM, and then the css is almost the same as your hover
writing method
伊谢尔伦2017-07-05 10:58:42
Can’t.
You can add a class to the hover style to let js control it.
.js-item-hover, .item:hover { ... }