2
在以下非常基本的示例中,交換機的工作原理正確。如果我僅將foundation.css版本從5.5.2更改爲6.0.5,則切換樣式會丟失。爲什麼交換機不能在Foundation 6.0中工作?再次,只需將樣式表更改爲「https://cdnjs.cloudflare.com/ajax/libs/foundation/6.0.5/css/foundation.css」即可停止工作。Foundation 6交換機不工作?
<!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>
感謝,這是它。我到處搜索。 –
沒有人知道如何簡單地使開關更寬? –
你需要重寫類.switch-paddle,並設置你想要的任何寬度,而且你可能想要改變輸入:checked〜.switch-paddle :: after(這是實際的開關)要移動達到所需的寬度。 – Patrick