代码拉取完成,页面将自动刷新
<!DOCTYPE html>
<html lang="zh">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0, minimal-ui">
<meta name="keywords" content="LightYear,LightYearAdmin,光年,后台模板,后台管理系统,光年HTML模板">
<meta name="description" content="Light Year Admin V5是一个基于Bootstrap v5.1.3的后台管理系统的HTML模板。">
<title>选择样式二 - 光年(Light Year Admin V4)后台管理系统模板</title>
<link rel="shortcut icon" type="image/x-icon" href="favicon.ico">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-touch-fullscreen" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="default">
<link rel="stylesheet" type="text/css" href="css/materialdesignicons.min.css">
<link rel="stylesheet" type="text/css" href="css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="css/style.min.css">
<style>
.recharge-amount li {
min-width: 110px;
cursor: pointer;
margin: 0px 5px 10px;
padding: 5px 15px;
color: #4d5259;
text-align: center;
border-radius: 5px;
-webkit-border-radius: 5px;
border: 3px solid transparent;
-webkit-box-shadow: 0 0 2px rgba(0, 0, 0, .175);
box-shadow: 0 0 2px rgba(0, 0, 0, .175);
}
.recharge-amount li.active {
border-color: var(--bs-purple);
}
.recharge-amount li input {
display: none;
}
</style>
</head>
<body>
<div class="container-fluid">
<div class="row">
<div class="col-lg-12">
<div class="card">
<header class="card-header">
<div class="card-title">选择样式二</div>
</header>
<div class="card-body">
<p>常见的选择充值金额功能。</p>
<ul class="list-inline recharge-amount">
<li class="list-inline-item">
<input type="radio" name="amount" value="6" />
<i class="mdi mdi-currency-btc fa-2x"></i>
<p>60个金币</p>
<p>6元</p>
</li>
<li class="list-inline-item">
<input type="radio" name="amount" value="12" />
<i class="mdi mdi-currency-btc fa-2x"></i>
<p>120个金币</p>
<p>12元</p>
</li>
<li class="list-inline-item">
<input type="radio" name="amount" value="30" />
<i class="mdi mdi-currency-btc fa-2x"></i>
<p>300个金币</p>
<p>30元</p>
</li>
<li class="list-inline-item">
<input type="radio" name="amount" value="68" />
<i class="mdi mdi-currency-btc fa-2x"></i>
<p>730个金币</p>
<p><span class="text-purple">68元</span> <small><s class="text-lighter">73元</s></small></p>
</li>
<li class="list-inline-item">
<input type="radio" name="amount" value="108" />
<i class="mdi mdi-currency-btc fa-2x"></i>
<p>1160个金币</p>
<p><span class="text-purple">108元</span> <small><s class="text-lighter">116元</s></small></p>
</li>
<li class="list-inline-item">
<input type="radio" name="amount" value="158" />
<i class="mdi mdi-currency-btc fa-2x"></i>
<p>1700个金币</p>
<p><span class="text-purple">158元</span> <small><s class="text-lighter">170元</s></small></p>
</li>
</ul>
<button class="btn btn-default" id="getChose">获取选中值</button>
<pre class="mt-3" id="console"></pre>
</div>
</div>
</div>
</div>
</div>
<script type="text/javascript" src="js/jquery.min.js"></script>
<script type="text/javascript" src="js/popper.min.js"></script>
<script type="text/javascript" src="js/bootstrap.min.js"></script>
<script type="text/javascript" src="js/main.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$(document).on('click', '.recharge-amount li', function() {
$(this).addClass('active').siblings().removeClass('active');
$(this).siblings().find('input').prop('checked', 0);
$(this).find('input').prop('checked', 1);
});
$('#getChose').on('click', function() {
var amount = $('input[name="amount"]:checked').val();
if ((typeof(amount) =='undefined')) {
amount = '您未选择充值金额';
}
$('#console').append(amount+'\n');
});
});
</script>
</body>
</html>
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。