【代码笔记】Web-ionic-toggle(切换开关)
一,效果图。
二,代码。
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Todo</title>
<meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no, width=device-width">
<link href="lib/ionic/css/ionic.css" rel="stylesheet">
<script src="lib/ionic/js/ionic.bundle.js"></script>
<!-- 在使用 Cordova/PhoneGap 创建的 APP 中包含的文件,由 Cordova/PhoneGap 提供,(开发过程中显示 404) -->
<script src="js/app2.js"></script>
<script src="cordova.js"></script>
</head>
<body>
<ul class="list">
<li class="item item-toggle">
HTML5
<label class="toggle toggle-positive">
<input type="checkbox" checked="">
<div class="track">
<div class="handle"></div>
</div>
</label>
</li>
<li class="item item-toggle">
CSS3
<label class="toggle toggle-calm">
<input type="checkbox" checked="">
<div class="track">
<div class="handle"></div>
</div>
</label>
</li>
<li class="item item-toggle">
Flashplayer
<label class="toggle toggle-balanced">
<input type="checkbox">
<div class="track">
<div class="handle"></div>
</div>
</label>
</li>
<li class="item item-toggle">
Java Applets
<label class="toggle toggle-energized">
<input type="checkbox">
<div class="track">
<div class="handle"></div>
</div>
</label>
</li>
<li class="item item-toggle">
JavaScript
<label class="toggle toggle-assertive">
<input type="checkbox" checked="">
<div class="track">
<div class="handle"></div>
</div>
</label>
</li>
<li class="item item-toggle">
Silverlight
<label class="toggle toggle-royal">
<input type="checkbox">
<div class="track">
<div class="handle"></div>
</div>
</label>
</li>
<li class="item item-toggle">
Web Components
<label class="toggle toggle-dark">
<input type="checkbox" checked="">
<div class="track">
<div class="handle"></div>
</div>
</label>
</li>
</ul>
</body>
</html>
参考资料:《菜鸟教程》
本文来自博客园,作者:花儿迎风笑,转载请注明原文链接:https://www.cnblogs.com/yang-guang-girl/p/9353325.html