Skip to content
Advertisement

How to customize arrow buttons in Swiper

How can I customize the arrow buttons below from swipers?

JavaScript

I did it crudely but it does not seem to be the right way because I get some margin on the right of the button.

JavaScript

The entire code:

JavaScript
JavaScript

I don’t want the margin.

Any ideas?

EDIT:

How do I change the colour blue on the arrow to black?

JavaScript

Does not work of course!

Advertisement

Answer

“I don’t want the margin. Any ideas?”

If the margin is really the margin, not the result of right property, try to overwrite default “swipers” styles using !important, like this:

JavaScript

Otherwise set right property to 0:

JavaScript

Or

JavaScript

If it doesn’t work without !important.


“How do I change the colour blue on the arrow to black?”

If you just want to make them black, you can simply use one of the built-in classes (swiper-button-black in your case) – thanks to this comment.

User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement