E
E
eldar_web2015-11-18 20:40:20
css
eldar_web, 2015-11-18 20:40:20

How to select an element by class in CSS?

There is an element:
<span class='next prev'></span>
How in CSS can I select span by class next and prev?
This is for some moments when one class cannot be, but the other remains - to prescribe for each case.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Stalker_RED, 2015-11-18
@eldar_web

.next, .prev {...} // или .next или .prev или оба
.next.prev { ... } // только оба
.next, .next.prev { ... } // .next или оба. Если будет только .prev - не сработает

H
holfza, 2015-11-18
@holfza

.next, .prev {...}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question