域名預(yù)訂/競(jìng)價(jià),好“米”不錯(cuò)過(guò)
這篇文章主要介紹了AmazeUI 單選框和多選框的實(shí)現(xiàn)示例,文中通過(guò)示例代碼介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友們下面隨著小編來(lái)一起學(xué)習(xí)學(xué)習(xí)吧
本文主要介紹了AmazeUI 單選框和多選框的實(shí)現(xiàn)示例,分享給大家,也給自己留個(gè)筆記,具體如下:
<!doctype html>
<html class="no-js">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>單選框和多選框</title>
<link rel="stylesheet" href="assets/css/amazeui.min.css">
<!--[if (gte IE 9)|!(IE)]><!-->
<script src="assets/js/jquery.min.js"></script>
<!--<![endif]-->
<!--[if lte IE 8 ]>
<script src="assets/ie8/jquery.min.js"></script>
<script src="assets/ie8/modernizr.js"></script>
<script src="assets/js/amazeui.ie8polyfill.min.js"></script>
<![endif]-->
<script src="assets/js/amazeui.min.js"></script>
</head>
<body style=" padding: 50px;">
<!--默認(rèn)樣式-->
<div class="am-g">
<div class="am-u-sm-6">
<h3>復(fù)選框</h3>
<label class="am-checkbox">
<input type="checkbox" value="" data-am-ucheck> 沒(méi)有選中
</label>
<label class="am-checkbox">
<input type="checkbox" checked="checked" value="" data-am-ucheck checked>
已選中
</label>
<label class="am-checkbox">
<input type="checkbox" value="" data-am-ucheck disabled>
禁用/未選中
</label>
<label class="am-checkbox">
<input type="checkbox" checked="checked" value="" data-am-ucheck disabled
checked>
禁用/已選中
</label>
</div>
<div class="am-u-sm-6">
<h3>單選框</h3>
<label class="am-radio">
<input type="radio" name="radio1" value="" data-am-ucheck>
未選中
</label>
<label class="am-radio">
<input type="radio" name="radio1" value="" data-am-ucheck checked>
已選中
</label>
<label class="am-radio">
<input type="radio" name="radio2" value="" data-am-ucheck disabled>
禁用/未選中
</label>
<label class="am-radio">
<input type="radio" name="radio2" value="" data-am-ucheck checked
disabled>
禁用/已選中
</label>
</div>
</div>
<!--顏色變化-->
<label class="am-checkbox am-secondary">
<input type="checkbox" value="" data-am-ucheck> 沒(méi)有選中
</label>
<label class="am-checkbox am-secondary">
<input type="checkbox" checked="checked" value="" data-am-ucheck checked>
已選中
</label>
<label class="am-radio am-secondary">
<input type="radio" name="radio3" value="" data-am-ucheck> 未選中
</label>
<label class="am-radio am-secondary">
<input type="radio" name="radio3" value="" data-am-ucheck checked> 已選中
</label>
<!--行內(nèi)排列-->
<div class="am-form-group">
<h3>裝備</h3>
<label class="am-checkbox-inline">
<input type="checkbox" value="" data-am-ucheck> iPhone
</label>
<label class="am-checkbox-inline">
<input type="checkbox" value="" data-am-ucheck> iMac
</label>
<label class="am-checkbox-inline">
<input type="checkbox" value="" data-am-ucheck> Macbook
</label>
</div>
<div class="am-form-group">
<h3>性別</h3>
<label class="am-radio-inline">
<input type="radio" name="radio10" value="male" data-am-ucheck> 男
</label>
<label class="am-radio-inline">
<input type="radio" name="radio10" value="female" data-am-ucheck> 女
</label>
<label class="am-radio-inline">
<input type="radio" name="radio10" value="pig" data-am-ucheck> 空
</label>
</div>
<!--結(jié)合表單驗(yàn)證插件-->
<form class="am-form" data-am-validator>
<div class="am-form-group">
<h3>裝備<sup class="am-text-danger">*</sup> (至少 2 項(xiàng),至多 4 項(xiàng))</h3>
<label class="am-checkbox">
<input type="checkbox" name="cbx" value="ip" data-am-ucheck required minchecked="2" maxchecked="4"> iPhone
</label>
<label class="am-checkbox">
<input type="checkbox" name="cbx" value="im" data-am-ucheck> iMac
</label>
<label class="am-checkbox">
<input type="checkbox" name="cbx" value="mbp" data-am-ucheck> Macbook Pro
</label>
<label class="am-checkbox">
<input type="checkbox" name="cbx" value="sf" data-am-ucheck> 蘇菲·麻索
</label>
<label class="am-checkbox">
<input type="checkbox" name="cbx" value="sur" data-am-ucheck> Surface
</label>
<label class="am-checkbox">
<input type="checkbox" name="cbx" value="rb" data-am-ucheck> Razer Blade
</label>
</div>
<div class="am-form-group">
<h3>性別 <sup class="am-text-danger">*</sup></h3>
<label class="am-radio">
<input type="radio" name="radio10" value="male" data-am-ucheck required> 男
</label>
<label class="am-radio">
<input type="radio" name="radio10" value="female" data-am-ucheck> 女
</label>
<label class="am-radio">
<input type="radio" name="radio10" value="pig" data-am-ucheck> 空
</label>
<div>
<div><button type="submit" class="am-btn am-btn-primary">提交</button></div>
</form>
</body>
</html>
效果圖:
到此這篇關(guān)于AmazeUI 單選框和多選框的實(shí)現(xiàn)示例的文章就介紹到這了,更多相關(guān)AmazeUI 單選框和多選框內(nèi)容請(qǐng)搜索腳本之家以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持腳本之家!
來(lái)源:腳本之家
鏈接:https://www.jb51.net/html5/741151.html
申請(qǐng)創(chuàng)業(yè)報(bào)道,分享創(chuàng)業(yè)好點(diǎn)子。點(diǎn)擊此處,共同探討創(chuàng)業(yè)新機(jī)遇!