在以下非常基本的示例中,开关可以正常工作并且样式正确。如果我只是将foundation.css 版本从5.5.2 更改为6.0.5,切换样式就会丢失。为什么开关在 Foundation 6.0 中不起作用???同样,只需将样式表更改为“ https://cdnjs.cloudflare.com/ajax/libs/foundation/6.0.5/css/foundation.css ”,它就会停止工作。
<!DOCTYPE html>
<html lang="en">
<head>
<title>Foundation Example</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/foundation/5.5.2/css/foundation.css">
<script src="http://cdnjs.cloudflare.com/ajax/libs/jquery/2.0.3/jquery.min.js"></script>
<script src="http://cdnjs.cloudflare.com/ajax/libs/foundation/6.0.5/js/foundation.min.js"></script></head>
<body>
<div style="padding:20px;">
<div class="switch large">
<input id="mySwitch1" type="checkbox">
<label for="mySwitch1"></label>
</div>
</div>
</body>
</html>