1 Star 0 Fork 36

马小帅 / Light Year Example

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
test_chose_3_v4.html 4.24 KB
一键复制 编辑 原始数据 按行查看 历史
<!DOCTYPE html>
<html lang="zh">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" />
<title>选择样式三 - 光年(Light Year Admin V4)后台管理系统模板</title>
<link rel="icon" href="favicon.ico" type="image/ico">
<meta name="keywords" content="LightYear,LightYearAdmin,光年,后台模板,后台管理系统,光年HTML模板">
<meta name="description" content="Light Year Admin V4是一个基于Bootstrap v4.4.1的后台管理系统的HTML模板。">
<meta name="author" content="yinqi">
<link href="http://lyear.itshubao.com/iframe/v4/css/bootstrap.min.css" rel="stylesheet">
<link href="css/materialdesignicons.min.css" rel="stylesheet">
<link href="http://lyear.itshubao.com/iframe/v4/css/style.min.css" rel="stylesheet">
<style>
[class*='badge-outline-'] {
position: relative;
border: 1px solid #ebebeb;
color: #4d5259;
font-size: 12px;
}
[class*='badge-outline-']:before {
content: "";
margin-right: 5px;
width: 8px;
height: 8px;
display: inline-block;
-wekit-border-radius: 50%;
border-radius: 50%;
}
.badge-outline-default::before {
background-color: #f5f6f7;
}
.badge-outline-primary::before {
background-color: #33cabb;
}
.badge-outline-success::before {
background-color: #15c377;
}
.badge-outline-info::before {
background-color: #48b0f7;
}
.badge-outline-warning::before {
background-color: #faa64b;
}
.badge-outline-danger::before {
background-color: #f96868;
}
.badge-outline-dark::before {
background-color: #465161;
}
.badge-outline-secondary::before {
background-color: #e4e7ea;
}
.badge-outline-purple::before {
background-color: #926dde;
}
.badge-outline-pink::before {
background-color: #f96197;
}
.badge-outline-cyan::before {
background-color: #57c7d4;
}
.badge-outline-yellow::before {
background-color: #fcc525;
}
.badge-outline-brown::before {
background-color: #8d6658;
}
.list-chose span {
cursor: pointer;
background-color: #fff;
padding-right: 16px;
-webkit-transition: .2s linear;
transition: .2s linear
}
.list-chose span input {
display: none;
}
.list-chose span:hover,
.list-chose span.active {
border-color: #33cabb;
}
.list-chose span.active:after {
font-family: 'Material Design Icons';
content: "\f12c";
width: 14px;
height: 14px;
display: inline-block;
-wekit-border-radius: 0 0 0 14px;
border-radius: 0 0 0 14px;
position: absolute;
top: 0px;
right: 0px;
background-color: #33cabb;
color: #fff;
}
</style>
</head>
<body>
<div class="container-fluid">
<div class="row">
<div class="col-md-12">
<div class="card">
<div class="card-header"><div class="card-title">选择样式三</div></div>
<div class="card-body">
<div class="form-group">
<p class="list-chose">
<span class="badge badge-outline-default active"><input type="radio" name="deploy" value="1" checked />官方配置一</span>
<span class="badge badge-outline-default"><input type="radio" name="deploy" value="2" />官方配置二</span>
<span class="badge badge-outline-default"><input type="radio" name="deploy" value="3" />官方配置三</span>
</p>
</div>
<div class="form-group">
<button class="btn btn-default" id="getChose">获取选中值</button>
<pre class="m-t-10" id="console"></pre>
</div>
</div>
</div>
</div>
</div>
</div>
<script type="text/javascript" src="http://lyear.itshubao.com/iframe/v4/js/jquery.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$(document).on('click', '.list-chose span', 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 deploy = $('input[name="deploy"]:checked').val();
if ((typeof(deploy) =='undefined')) {
deploy = '您未选择配置';
}
$('#console').append('你选中的配置是:' + deploy + '\n');
});
});
</script>
</body>
</html>
HTML
1
https://gitee.com/weikety/Light-Year-Example.git
git@gitee.com:weikety/Light-Year-Example.git
weikety
Light-Year-Example
Light Year Example
master

搜索帮助