gpt4 book ai didi

zurb-foundation - Foundation 6 开关不起作用?

转载 作者:行者123 更新时间:2023-12-03 23:36:06 24 4
gpt4 key购买 nike

在以下非常基本的示例中,开关可以正常工作并且样式正确。如果我只是将 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>

最佳答案

Foundation 在 6.0 版中略微更改了其命名方案,因此您需要更新 HTML 以匹配它。请参阅此处的文档:

http://foundation.zurb.com/sites/docs/switch.html

    <div class="switch large">
<input class="switch-input" id="largeSwitch" type="checkbox" name="exampleSwitch">
<label class="switch-paddle" for="largeSwitch">
<span class="show-for-sr">Show Large Elephants</span>
</label>
</div>

关于zurb-foundation - Foundation 6 开关不起作用?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34536710/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com