I'm using Velocity JS to fade a list object.
The problem is that Velocity applies display: list-item; opacity: 1; to the element and overrides my display: inline-block; and my list is now vertical.
How can I force it to always use inline-block?
https://jsfiddle.net/01qvqmxa/
HTML
- test
- test
- test
CSS
li {
opacity: 0;
display: inline-block;
padding: 1em;
}
JS
$(".myList li").velocity("fadeIn", { delay: 300, duration: 2000 });
Solved
Try using the !important notation:
li {
opacity: 0;
display: inline-block !important;
padding: 1em;
}
Comments
Post a Comment