Reputation: 152677
.offbeat {background-position: x y }
.active .offbeat {background-position: x y }
Becuase in active condition i want to chage the position of image.
active mean selected in my case
Upvotes: 0
Views: 163
Reputation: 12190
For Styling simply add the active class -
<div class="offbeat active">Some Content</div>
If you are using jQuery -
$('.offbeat').click(function(){
$(this).toggleClass('active')
});
And change the background position of the image -
.active{
background-position: x y; /*New Position*/
}
Do not inherit active class with offbeat
Try adding -
.offbeat:active{...............}
Don't know about compass but this is how CSS works!
Upvotes: 1