第一次用这个框架,好奇怪, Jquery 导入, semantic 的 css 和 js 导入,顺序正确, webstorm 文件检查正常。为啥就是用不了折叠菜单呢?样式明明都有了,点了就是没有折叠效果。实在谷歌不到了= =
<!DOCTYPE html>
<html>
<head>
<title>The Boom!</title>
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
<link rel="stylesheet" type="text/css" href="Semantic/dist/semantic.css">
<script type="text/javascript" src="Semantic/jquery.js"></script>
<script src="Semantic/dist/semantic.js"></script>
</head>
<body>
<div class="ui accordion">
<div class="title"><i class="dropdown icon"></i> What is a dog? </div>
<div class="content">
<p class="transition hidden">A dog is a type of domesticated animal. </p>
</div>
<div class="title"><i class="dropdown icon"></i> What kinds of dogs are there? </div>
<div class="content">
<p>There are many breeds of dogs.</p>
</div>
<div class="title"><i class="dropdown icon"></i> How do you acquire a dog? </div>
<div class="content">
<p>Three common ways for a prospective owner to acquire a dog is from pet shops.</p>
</div>
</div>
</body>
</html>
1
sansansine 2017 年 4 月 20 日
遇到同样问题,楼主找到原因了吗?求赐教啊
|
2
hyperxu 2017 年 4 月 29 日
|
3
sansansine 2017 年 4 月 30 日 via Android 需要写一段 js,官方文档里有
|
4
kbrx93 2018 年 2 月 3 日
$('.ui.accordion')
.accordion() ; 增加 JS 代码在 body 底部即可 |