我正在尝试从Semantic UI测试语义UI Dropdown模块。
当我尝试使用它时,它实际上并没有"下降"。我试图解决这个问题,但我似乎无法使其发挥作用。
以下是我的例子:
<!DOCTYPE html>
<html>
<head>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.2.7/semantic.min.css"/>
<script src="https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.2.7/semantic.min.js"></script>
</head>
<body>
<div class="ui multiple dropdown">
<input type="hidden" name="filters">
<i class="filter icon"></i>
<span class="text">Filter Posts</span>
<div class="menu">
<div class="ui icon search input">
<i class="search icon"></i>
<input type="text" placeholder="Search tags...">
</div>
<div class="scrolling menu">
<div class="item" data-value="important">
<div class="ui red empty circular label"></div>
Important
</div>
<div class="item" data-value="enhancement">
<div class="ui orange empty circular label"></div>
Enhancement
</div>
</div>
</div>
</div>
</body>
</html>
我需要做些什么才能让Semantic UI Dropdown工作?
答案 0 :(得分:0)
只需要添加一个脚本来启动语义ui:
<script>
$('.ui.dropdown').dropdown();
</script>