You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

53 lines
1.9 KiB

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>自定义固定条示例 - Layui</title>
<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="//unpkg.com/layui@2.9.18/dist/css/layui.css" rel="stylesheet">
<style>
.layui-fixbar li {
height: 38px;
line-height: 38px;
border: 1px solid transparent;
padding: 0 18px;
background-color: #16baaa;
color: #fff;
white-space: nowrap;
text-align: center;
font-size: 14px !important;
border-radius: 2px;
cursor: pointer;
}
</style>
</head>
<body>
<div id="target-test" style="position: relative; padding: 16px;">
<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
</div>
<script src="//unpkg.com/layui@2.9.18/dist/layui.js"></script>
<script>
layui.use(function () {
var util = layui.util;
// 自定义固定条
util.fixbar({
default: false,
bars: [{
type: 'groups',
content: '保存数据',
style: 'font-size: 21px;'
}],
css: { top: 10 },
click: function (type) {
console.log(type);
}
});
});
</script>
</body>
</html>