语义 UI 进度条不会初始化
Semantic UI progress bar won't initialize
我最近一直在设计自己的网站,但一直难以使用语义 UI 进度条。我到处找不同的方法,甚至直接复制了Semantic example,还是不行。它所显示的只是一个蓝绿色进度条,每次都具有相同的进度。任何想法为什么?提前致谢
<!DOCTYPE html>
<html lang="en">
<head>
<title>Test</title>
<link rel ="stylesheet" href="css/style.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.4.1/semantic.min.css" type="text/css">
</head>
<body>
<div class="ui teal progress" id="example2">
<div class="bar"></div>
<div class="label">22% Earned</div>
</div>
<script>
$('#example2').progress({
percent: 22
});
</script>
</body>
</html>
我刚刚获取了您的代码并包含了缺失但需要的红色库(jQuery 和语义-ui)。现在可以了:)
$('#example2').progress({
percent: 22
});
<!DOCTYPE html>
<html lang="en">
<head>
<title>Test</title>
<link rel ="stylesheet" href="css/style.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.4.1/semantic.min.css" type="text/css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.4.1/semantic.min.js"></script>
</head>
<body>
<div class="ui teal progress" id="example2">
<div class="bar"></div>
<div class="label">22% Earned</div>
</div>
</body>
</html>
我最近一直在设计自己的网站,但一直难以使用语义 UI 进度条。我到处找不同的方法,甚至直接复制了Semantic example,还是不行。它所显示的只是一个蓝绿色进度条,每次都具有相同的进度。任何想法为什么?提前致谢
<!DOCTYPE html>
<html lang="en">
<head>
<title>Test</title>
<link rel ="stylesheet" href="css/style.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.4.1/semantic.min.css" type="text/css">
</head>
<body>
<div class="ui teal progress" id="example2">
<div class="bar"></div>
<div class="label">22% Earned</div>
</div>
<script>
$('#example2').progress({
percent: 22
});
</script>
</body>
</html>
我刚刚获取了您的代码并包含了缺失但需要的红色库(jQuery 和语义-ui)。现在可以了:)
$('#example2').progress({
percent: 22
});
<!DOCTYPE html>
<html lang="en">
<head>
<title>Test</title>
<link rel ="stylesheet" href="css/style.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.4.1/semantic.min.css" type="text/css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.4.1/semantic.min.js"></script>
</head>
<body>
<div class="ui teal progress" id="example2">
<div class="bar"></div>
<div class="label">22% Earned</div>
</div>
</body>
</html>