How can I put multiple classes in a <li> element?
问题 I am working with a navigation menu, and wondering how to put multiple classes in a li tag: This is the li tag <li class='pil' class='dropdown'> And this is also what I want in the li tag: class='{{ ($aktiv == 'dagvakt') ? 'active' : '' }}' I tried this and it didn't work: <li class='pil' class='dropdown' class='{{ ($aktiv == 'dagvakt') ? 'active' : '' }}'> 回答1: You can add multiple classes to an element by putting them all in the same class attribute and separating them with a space. For