源代码 :
点击运行
<html ng-app="ionicApp"> <head> <meta charset="utf-8"> <meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no, width=device-width"> <title>开源教程(ossoft.cn)</title> <link href="https://cdn.staticfile.org/ionic/1.3.2/css/ionic.css" rel="stylesheet"> <script src="https://cdn.staticfile.org/ionic/1.3.2/js/ionic.bundle.min.js"></script> </head> <body> <div class="bar bar-header"> <div class="h1 title">单选按钮列表</div> </div> <div class="content has-header"> <div class="list"> <label class="item item-radio"> <input type="radio" name="group" value="go" checked="checked"> <div class="radio-content"> <div class="item-content"> Go </div> <i class="radio-icon ion-checkmark"></i> </div> </label> <label class="item item-radio"> <input type="radio" name="group" value="python"> <div class="radio-content"> <div class="item-content"> Python </div> <i class="radio-icon ion-checkmark"></i> </div> </label> <label class="item item-radio"> <input type="radio" name="group" value="ruby"> <div class="radio-content"> <div class="item-content"> Ruby </div> <i class="radio-icon ion-checkmark"></i> </div> </label> <label class="item item-radio"> <input type="radio" name="group" value=".net"> <div class="radio-content"> <div class="item-content"> .Net </div> <i class="radio-icon ion-checkmark"></i> </div> </label> <label class="item item-radio"> <input type="radio" name="group" value="java"> <div class="radio-content"> <div class="item-content"> Java </div> <i class="radio-icon ion-checkmark"></i> </div> </label> <label class="item item-radio"> <input type="radio" name="group" value="php"> <div class="radio-content"> <div class="item-content"> PHP </div> <i class="radio-icon ion-checkmark"></i> </div> </label> </div> </div> </body> </html>
运行结果