Bulma下拉列表似乎没有在点击时切换.以下是文档中的代码段:https://bulma.io/documentation/components/dropdown/
@H_301_9@
最佳答案@H_301_9@
您需要使用JavaScript切换类是活动的.当.dropdown具有.is-active时,它会将.dropdown-menu的显示从none更改为block.
这是实现它的基本方法.
var dropdown = document.querySelector('.dropdown');
dropdown.addEventListener('click',function(event) {
event.stopPropagation();
dropdown.classList.toggle('is-active');
});
required for the icon-->
@H_301_9@