A
A
Alex_872017-07-27 00:30:24
Less
Alex_87, 2017-07-27 00:30:24

LESS, :before and background-position pseudo-elements?

Hello! Please tell me, I can not set background-position to the sprite.
The point is that the .min-icons class is given a :before pseudo-element with an image. The same element, in addition to this class, has the .seo class. The second class is usually given a backgroun-position.
645ecad15a694c798d62ee35a361c5bb.png
But I don’t know how this is done in LESS.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry Kim, 2017-07-27
@Alex_87

.min-icons::before {
  background-image: url(/images/sprite.png);
}
.min-icons.seo::before {
  background-position: -10px 0;
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question