mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-11-07 23:16:52 +08:00
radio buttons
This commit is contained in:
37
dist/css/ionic-ios7.css
vendored
37
dist/css/ionic-ios7.css
vendored
@ -1109,7 +1109,7 @@ a.list-item {
|
||||
position: relative;
|
||||
background-color: #fff;
|
||||
z-index: 2;
|
||||
padding: 15px 15px;
|
||||
padding: 15px;
|
||||
-webkit-transition: margin-left 0.2s ease-in-out, margin-right 0.2s ease-in-out, left 0.2s ease-in-out; }
|
||||
.list-item-content > i:last-child {
|
||||
float: right; }
|
||||
@ -1523,26 +1523,23 @@ input[type="checkbox"][readonly] {
|
||||
-webkit-transform: none;
|
||||
transition-delay: 0.05s, 0s; }
|
||||
|
||||
/* hide a radio button's icon by default */
|
||||
.radio-item [class^="icon-"],
|
||||
.radio-item [class*=" icon-"] {
|
||||
display: none; }
|
||||
|
||||
.radio-list label.list-item {
|
||||
cursor: pointer; }
|
||||
|
||||
.radio-list input[type="radio"] {
|
||||
.radio-buttton-list [class^="icon-"],
|
||||
.radio-buttton-list [class*=" icon-"] {
|
||||
position: absolute;
|
||||
top: 25%;
|
||||
left: 25%;
|
||||
visibility: hidden;
|
||||
font-size: 24px; }
|
||||
.radio-buttton-list input[type="radio"] {
|
||||
/* hide any radio button inputs elements (the ugly circles) */
|
||||
display: none;
|
||||
/* when this radio-item is checked */ }
|
||||
.radio-list input[type="radio"]:checked + .radio-item {
|
||||
/* show the radio-item icon when checked */ }
|
||||
.radio-list input[type="radio"]:checked + .radio-item [class^="icon-"],
|
||||
.radio-list input[type="radio"]:checked + .radio-item [class*=" icon-"] {
|
||||
position: absolute;
|
||||
top: 16px;
|
||||
right: 10px;
|
||||
display: inline; }
|
||||
display: none; }
|
||||
.radio-buttton-list input[type="radio"]:checked + [class^="icon-"], .radio-buttton-list input[type="radio"]:checked + [class*=" icon-"] {
|
||||
visibility: visible; }
|
||||
.radio-buttton-list .list-item-content {
|
||||
padding-right: 60px; }
|
||||
.radio-buttton-list .list-item-buttons {
|
||||
z-index: 3;
|
||||
width: 45px; }
|
||||
|
||||
.button {
|
||||
position: relative;
|
||||
|
||||
961
dist/css/ionic-scoped.css
vendored
961
dist/css/ionic-scoped.css
vendored
File diff suppressed because one or more lines are too long
744
dist/css/ionic.css
vendored
744
dist/css/ionic.css
vendored
File diff suppressed because one or more lines are too long
@ -124,7 +124,7 @@ a.list-item {
|
||||
|
||||
z-index: 2;
|
||||
|
||||
padding: 15px 15px;
|
||||
padding: $list-item-padding;
|
||||
|
||||
-webkit-transition: margin-left 0.2s ease-in-out, margin-right 0.2s ease-in-out, left 0.2s ease-in-out;
|
||||
|
||||
|
||||
@ -2,31 +2,34 @@
|
||||
// Radio Buttons
|
||||
// -------------------------------
|
||||
|
||||
/* hide a radio button's icon by default */
|
||||
.radio-item {
|
||||
.radio-buttton-list {
|
||||
|
||||
[class^="icon-"],
|
||||
[class*=" icon-"] {
|
||||
display: none;
|
||||
position: absolute;
|
||||
top: 25%;
|
||||
left: 25%;
|
||||
visibility: hidden;
|
||||
font-size: 24px;
|
||||
}
|
||||
}
|
||||
.radio-list label.list-item {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.radio-list input[type="radio"] {
|
||||
/* hide any radio button inputs elements (the ugly circles) */
|
||||
display: none;
|
||||
input[type="radio"] {
|
||||
/* hide any radio button inputs elements (the ugly circles) */
|
||||
display: none;
|
||||
|
||||
/* when this radio-item is checked */
|
||||
&:checked + .radio-item {
|
||||
|
||||
/* show the radio-item icon when checked */
|
||||
[class^="icon-"],
|
||||
[class*=" icon-"] {
|
||||
position: absolute;
|
||||
top: 16px;
|
||||
right: $content-padding;
|
||||
display: inline;
|
||||
&:checked + [class^="icon-"],
|
||||
&:checked + [class*=" icon-"] {
|
||||
visibility: visible;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.list-item-content {
|
||||
padding-right: $list-item-padding * 4;
|
||||
}
|
||||
|
||||
.list-item-buttons {
|
||||
z-index: 3;
|
||||
width: $list-item-padding * 3;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -341,6 +341,7 @@ $tabs-dark-border-color: $button-dark-border;
|
||||
$list-divider-bg: #f5f5f5;
|
||||
$list-divider-color: #222;
|
||||
$list-item-border: 1px solid #ddd;
|
||||
$list-item-padding: 15px !default;
|
||||
|
||||
$list-default-background: $brand-default;
|
||||
$list-default-border: #ddd;
|
||||
|
||||
@ -5,59 +5,44 @@
|
||||
|
||||
<!-- 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 class="view">
|
||||
<header class="bar bar-header bar-dark">
|
||||
<h1 class="title">Radio Buttons</h1>
|
||||
</header>
|
||||
|
||||
<header class="bar bar-header bar-dark">
|
||||
<h1 class="title">Radio Buttons</h1>
|
||||
</header>
|
||||
<header class="bar bar-footer bar-dark">
|
||||
<h1 class="title">Footer</h1>
|
||||
</header>
|
||||
|
||||
<header class="bar bar-footer bar-dark">
|
||||
<h1 class="title">Footer</h1>
|
||||
</header>
|
||||
<div class="content-wrapper">
|
||||
|
||||
<div class="content has-header has-footer">
|
||||
<div class="content has-header">
|
||||
|
||||
<div class="radio-buttton-list">
|
||||
|
||||
<div class="list radio-list">
|
||||
<label class="list-item">
|
||||
<input type="radio" name="serverside" value="go" checked="checked">
|
||||
<div class="radio-item">
|
||||
<div class="list-item-content">
|
||||
Go
|
||||
<i class="icon-ok"></i>
|
||||
</div>
|
||||
<div class="list-item-buttons">
|
||||
<input type="radio" name="serverside" value="go" checked="checked">
|
||||
<i class="icon-checkmark"></i>
|
||||
</div>
|
||||
</label>
|
||||
|
||||
<label class="list-item">
|
||||
<input type="radio" name="serverside" value="python">
|
||||
<div class="radio-item">
|
||||
<div class="list-item-content">
|
||||
Python
|
||||
<i class="icon-ok"></i>
|
||||
</div>
|
||||
</label>
|
||||
<label class="list-item">
|
||||
<input type="radio" name="serverside" value=".net">
|
||||
<div class="radio-item">
|
||||
.Net
|
||||
<i class="icon-ok"></i>
|
||||
</div>
|
||||
</label>
|
||||
<label class="list-item">
|
||||
<input type="radio" name="serverside" value="ruby">
|
||||
<div class="radio-item">
|
||||
Ruby
|
||||
<i class="icon-ok"></i>
|
||||
</div>
|
||||
</label>
|
||||
<label class="list-item">
|
||||
<input type="radio" name="serverside" value="java">
|
||||
<div class="radio-item">
|
||||
Java
|
||||
<i class="icon-ok"></i>
|
||||
</div>
|
||||
<div class="list-item-buttons">
|
||||
<input type="radio" name="serverside" value="python">
|
||||
<i class="icon-checkmark"></i>
|
||||
</div>
|
||||
</label>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="padding">
|
||||
@ -66,10 +51,7 @@
|
||||
|
||||
</div>
|
||||
|
||||
</section>
|
||||
|
||||
<script src="../dist/ionic.js"></script>
|
||||
<script src="../dist/ionic-simple.js"></script>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user