进度条未填充进度条脚本标签
Progress bar not filling with progress bar script tag
预期的结果是页面加载时,进度条加载如下:https://i.imgur.com/VztbDdC.png
然而我得到的结果是一个没有进度的进度条,像这样:https://i.imgur.com/iO93CrO.png
下面列出了 jQuery 和 semantic/fomantic UI 库的 link:
<link rel="stylesheet" type="text/css" href="semantic/dist/semantic.min.css">
<script
src="https://code.jquery.com/jquery-3.1.1.min.js"
integrity="sha256-hVVnYaiADRTO2PzUGmuLJr8BLUSjGIZsDYGmIJLv2b8="
crossorigin="anonymous"></script>
<script src="semantic/dist/semantic.min.js"></script>
<script>
$('#progressHTML').progress();
</script>
网站中实际有进度条的区域如下:
<div id="skills" class="skills-containter">
<div class="skills-text-containter">
<h1 class="ui header skills-header">Skills</h1>
<div class="ui blue progress" data-percent="74" id="progressHTML">
<div class="bar"></div>
<div class="label">HTML</div>
</div>
<p class="ui paragraph skills-paragraph">no</p>
</div>
</div>
如有任何帮助,我们将不胜感激。 :)
您忘记在 jQuery 的就绪事件中添加 $('#progressHTML').progress();
,如下所示:
$(document).ready(function() {
$('#progressHTML').progress();
});
一个例子在我制作的 codepen 中运行:
https://codepen.io/mayconmesquita/pen/YzyGvVN
代码:
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.4.1/semantic.min.css">
<script
src="https://code.jquery.com/jquery-3.1.1.min.js"
integrity="sha256-hVVnYaiADRTO2PzUGmuLJr8BLUSjGIZsDYGmIJLv2b8="
crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.4.1/semantic.min.js"></script>
<script>
$( document ).ready(function() {
$('#progressHTML').progress();
});
</script>
<div id="skills" class="skills-containter">
<div class="skills-text-containter">
<h1 class="ui header skills-header">Skills</h1>
<div class="ui blue progress" data-percent="74" id="progressHTML">
<div class="bar"></div>
<div class="label">HTML</div>
</div>
<p class="ui paragraph skills-paragraph">no</p>
</div>
</div>
预期的结果是页面加载时,进度条加载如下:https://i.imgur.com/VztbDdC.png
然而我得到的结果是一个没有进度的进度条,像这样:https://i.imgur.com/iO93CrO.png
下面列出了 jQuery 和 semantic/fomantic UI 库的 link:
<link rel="stylesheet" type="text/css" href="semantic/dist/semantic.min.css">
<script
src="https://code.jquery.com/jquery-3.1.1.min.js"
integrity="sha256-hVVnYaiADRTO2PzUGmuLJr8BLUSjGIZsDYGmIJLv2b8="
crossorigin="anonymous"></script>
<script src="semantic/dist/semantic.min.js"></script>
<script>
$('#progressHTML').progress();
</script>
网站中实际有进度条的区域如下:
<div id="skills" class="skills-containter">
<div class="skills-text-containter">
<h1 class="ui header skills-header">Skills</h1>
<div class="ui blue progress" data-percent="74" id="progressHTML">
<div class="bar"></div>
<div class="label">HTML</div>
</div>
<p class="ui paragraph skills-paragraph">no</p>
</div>
</div>
如有任何帮助,我们将不胜感激。 :)
您忘记在 jQuery 的就绪事件中添加 $('#progressHTML').progress();
,如下所示:
$(document).ready(function() {
$('#progressHTML').progress();
});
一个例子在我制作的 codepen 中运行:
https://codepen.io/mayconmesquita/pen/YzyGvVN
代码:
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.4.1/semantic.min.css">
<script
src="https://code.jquery.com/jquery-3.1.1.min.js"
integrity="sha256-hVVnYaiADRTO2PzUGmuLJr8BLUSjGIZsDYGmIJLv2b8="
crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.4.1/semantic.min.js"></script>
<script>
$( document ).ready(function() {
$('#progressHTML').progress();
});
</script>
<div id="skills" class="skills-containter">
<div class="skills-text-containter">
<h1 class="ui header skills-header">Skills</h1>
<div class="ui blue progress" data-percent="74" id="progressHTML">
<div class="bar"></div>
<div class="label">HTML</div>
</div>
<p class="ui paragraph skills-paragraph">no</p>
</div>
</div>