语义UI下拉的行为与默认选择下拉列表类似
我没有初步选择此下拉菜单,但它的作用就像选择下拉菜单一样 我不明白为什么它会像那样向我展示。请帮我找到解决这个问题的方法。 http://jsfiddle.net/kd00bw5q/
<div class="ui dropdown">
<div class="text">File</div>
<i class="dropdown icon"></i>
<div class="menu">
<div class="item">New</div>
<div class="item">Make a copy</div>
<div class="item">
<i class="folder icon"></i>
Move to folder
</div>
<div class="item">
<i class="trash icon"></i>
Move to trash
</div>
<div class="divider"></div>
<div class="item">Download As...</div>
<div class="item">E-mail Collaborators</div>
</div>
</div>
$('.ui.dropdown')
.dropdown()
;
提前致谢:)
答案 0 :(得分:1)
我终于找到了解决方案
问题出在&#34; .text&#34;类。如果使用.text类的整个div删除了问题
以下是更新后的代码
<div class="ui dropdown">
<i class="file icon"></i> File
<i class="dropdown icon"></i>
<div class="menu">
<div class="item">New</div>
<div class="item">Make a copy</div>
<div class="item">
<i class="folder icon"></i>
Move to folder
</div>
<div class="item">
<i class="trash icon"></i>
Move to trash
</div>
<div class="divider"></div>
<div class="item">Download As...</div>
<div class="item">E-mail Collaborators</div>
</div>
</div>
$('.ui.dropdown')
.dropdown()
;