mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-11-08 15:51:16 +08:00
toggle updates
This commit is contained in:
@ -1,11 +1,14 @@
|
||||
|
||||
// Toggle
|
||||
// -------------------------------
|
||||
|
||||
/* the overall container of the toggle */
|
||||
.toggle {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
/* hide the actual checkbox */
|
||||
.toggle input {
|
||||
/* hide the actual <input type="checkbox"> */
|
||||
.toggle input[type="checkbox"] {
|
||||
display: none;
|
||||
}
|
||||
|
||||
@ -21,9 +24,9 @@
|
||||
background-color: $toggle-off-bg-color;
|
||||
cursor: pointer;
|
||||
|
||||
transition-property: background-color, border;
|
||||
transition-duration: $toggle-transition-duration;
|
||||
transition-timing-function: ease-in-out;
|
||||
transition-duration: $toggle-transition-duration;
|
||||
transition-property: background-color, border;
|
||||
}
|
||||
|
||||
/* the handle (circle) thats inside the toggle's track area */
|
||||
@ -40,11 +43,11 @@
|
||||
/* used to create a larger hit area to slide the handle */
|
||||
&:before {
|
||||
position: absolute;
|
||||
content: " ";
|
||||
top: -2px;
|
||||
left: ( ($toggle-handle-width / 2) * -1) - 2;
|
||||
display: table;
|
||||
left: ( ($toggle-handle-width / 2) * -1);
|
||||
top: ( ($toggle-handle-height / 2) * -1) + 3;
|
||||
padding: ($toggle-handle-height / 2) ($toggle-handle-width + 2);
|
||||
padding: ($toggle-handle-height / 2) + 3 ($toggle-handle-width + 2);
|
||||
content: " ";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -5,37 +5,36 @@
|
||||
|
||||
<!-- Sets initial viewport load and disables zooming -->
|
||||
<meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no">
|
||||
<link href="../dist/ionicons.css" rel="stylesheet">
|
||||
<link href="../dist/ionic.css" rel="stylesheet">
|
||||
<link href="../dist/css/ionic.css" rel="stylesheet">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<section>
|
||||
|
||||
<header class="bar bar-header bar-dark">
|
||||
<h1 class="title">Input: Toggle</h1>
|
||||
</header>
|
||||
|
||||
<div class="content-wrapper">
|
||||
|
||||
<main class="content has-header">
|
||||
|
||||
<ul class="list">
|
||||
<li class="list-item">
|
||||
Airplane Mode
|
||||
<div class="toggle" id="airplaneMode">
|
||||
<label class="toggle" id="airplaneMode">
|
||||
<input type="checkbox" name="airplaneMode">
|
||||
<div class="track">
|
||||
<div class="handle"></div>
|
||||
</div>
|
||||
</div>
|
||||
</label>
|
||||
</li>
|
||||
<li class="list-item">
|
||||
Do Not Disturb
|
||||
<div class="toggle" id="doNotDisturb">
|
||||
<label class="toggle" id="doNotDisturb">
|
||||
<input type="checkbox" name="doNotDisturb" checked="checked">
|
||||
<div class="track">
|
||||
<div class="handle"></div>
|
||||
</div>
|
||||
</div>
|
||||
</label>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
@ -54,11 +53,11 @@
|
||||
|
||||
</main>
|
||||
|
||||
</section>
|
||||
</div>
|
||||
|
||||
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
|
||||
<script src="../dist/ionic.js"></script>
|
||||
<script src="../dist/ionic-simple.js"></script>
|
||||
<script src="../dist/js/ionic.js"></script>
|
||||
<script src="../dist/js/ionic-simple.js"></script>
|
||||
|
||||
|
||||
<!-- for testing only -->
|
||||
|
||||
Reference in New Issue
Block a user