A
A
Alexander Timofeev2015-10-16 10:53:31
css
Alexander Timofeev, 2015-10-16 10:53:31

How to rotate the image, for example, 180 gr. (or reverse the image) using css for the image set by content in pseudo-elements?

.carousel-control .icon-next:before {
        content: url(images/arrow-left-carusel-2.png);
    }

Those. I would like to do without photoshop. I tried transform, but either I didn’t understand how, or it’s impossible.
transform: rotate(180deg);

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Timofeev, 2015-10-16
@aldtimofeev

I understand what's the matter, transform just needs to be applied not to the pseudo-element, but to the element itself.
Those. So

.carousel-control .icon-next {
transform: rotate(180deg);
}
/* или так */
.carousel-control .icon-next {
transform: scaleX(-1);
}

without :before

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question