2018-04-24 10:21:01 +08:00
|
|
|
<!DOCTYPE html>
|
|
|
|
<html>
|
|
|
|
<head>
|
|
|
|
<meta charset="utf-8">
|
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
|
|
|
|
<title>评分 - layui</title>
|
|
|
|
|
|
|
|
<link rel="stylesheet" href="../src/css/layui.css">
|
|
|
|
|
|
|
|
<style>
|
|
|
|
body{padding:20px;}
|
|
|
|
</style>
|
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
|
2018-04-24 14:56:49 +08:00
|
|
|
<div class="layui-container">
|
|
|
|
<div class="layui-row">
|
|
|
|
<!-- 基础评分用法 -->
|
|
|
|
<div class="layui-rate layui-col-xm4 layui-col-xm-offset4 ">
|
|
|
|
<h3>基础用法</h3>
|
|
|
|
<hr>
|
|
|
|
<ul class="layui-rate-primary">
|
|
|
|
<li class="layui-inline"><i class="layui-icon layui-icon-rate"></i></li>
|
|
|
|
<li class="layui-inline"><i class="layui-icon layui-icon-rate"></i></li>
|
|
|
|
<li class="layui-inline"><i class="layui-icon layui-icon-rate"></i></li>
|
|
|
|
<li class="layui-inline"><i class="layui-icon layui-icon-rate"></i></li>
|
|
|
|
<li class="layui-inline"><i class="layui-icon layui-icon-rate"></i></li>
|
|
|
|
</ul>
|
|
|
|
</div>
|
2018-04-24 10:21:01 +08:00
|
|
|
|
2018-04-24 14:56:49 +08:00
|
|
|
<!-- 半星评分用法 -->
|
|
|
|
<div class="layui-rate layui-col-xm4 layui-col-xm-offset4 ">
|
|
|
|
<h3>选中半星</h3>
|
|
|
|
<hr>
|
|
|
|
<ul class="layui-rate-half">
|
|
|
|
<li class="layui-inline"><i class="layui-icon layui-icon-rate"></i></li>
|
|
|
|
<li class="layui-inline"><i class="layui-icon layui-icon-rate"></i></li>
|
|
|
|
<li class="layui-inline"><i class="layui-icon layui-icon-rate"></i></li>
|
|
|
|
<li class="layui-inline"><i class="layui-icon layui-icon-rate"></i></li>
|
|
|
|
<li class="layui-inline"><i class="layui-icon layui-icon-rate"></i></li>
|
|
|
|
</ul>
|
|
|
|
</div>
|
2018-04-24 10:21:01 +08:00
|
|
|
|
2018-04-24 14:56:49 +08:00
|
|
|
<!-- 显示提示文字 -->
|
|
|
|
<div class="layui-rate layui-col-xm4 layui-col-xm-offset4 ">
|
|
|
|
<h3>显示提示文字</h3>
|
|
|
|
<hr>
|
|
|
|
<ul class="layui-rate-text">
|
|
|
|
<li class="layui-inline"><i class="layui-icon layui-icon-rate"></i></li>
|
|
|
|
<li class="layui-inline"><i class="layui-icon layui-icon-rate"></i></li>
|
|
|
|
<li class="layui-inline"><i class="layui-icon layui-icon-rate"></i></li>
|
|
|
|
<li class="layui-inline"><i class="layui-icon layui-icon-rate"></i></li>
|
|
|
|
<li class="layui-inline"><i class="layui-icon layui-icon-rate"></i></li>
|
|
|
|
</ul>
|
|
|
|
<span></span>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<!-- 只读 -->
|
|
|
|
<div class="layui-rate layui-col-xm4 layui-col-xm-offset4 ">
|
|
|
|
<h3>只读</h3>
|
|
|
|
<hr>
|
|
|
|
<ul class="layui-rate-read">
|
|
|
|
<li class="layui-inline"><i class="layui-icon layui-icon-rate-solid"></i></li>
|
|
|
|
<li class="layui-inline"><i class="layui-icon layui-icon-rate-solid"></i></li>
|
|
|
|
<li class="layui-inline"><i class="layui-icon layui-icon-rate"></i></li>
|
|
|
|
<li class="layui-inline"><i class="layui-icon layui-icon-rate"></i></li>
|
|
|
|
<li class="layui-inline"><i class="layui-icon layui-icon-rate"></i></li>
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2018-04-24 10:21:01 +08:00
|
|
|
|
|
|
|
|
|
|
|
<script src="../src/layui.js"></script>
|
|
|
|
<script>
|
|
|
|
|
2018-04-24 14:56:49 +08:00
|
|
|
layui.use(['rate'], function(){
|
|
|
|
var rate = layui.rate;
|
|
|
|
rate.primary(".layui-rate-primary","li"){
|
|
|
|
|
|
|
|
}
|
2018-04-24 10:21:01 +08:00
|
|
|
});
|
|
|
|
</script>
|
|
|
|
</body>
|
|
|
|
</html>
|