问题描述
我想改变
layui时间日历布局大小,这个要怎么操作呢?
解决办法
可以用css样式对时间日历进行重新布局,具体代码如下:
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title></title>
<link rel="stylesheet" href="../../layui/css/layui.css" />
<style>
#test-n1 .layui-laydate-main{width:600px;}
#test-n1 .layui-laydate-content td,#test-n1 .layui-laydate-content th{width:87px;height: 50px;}
</style>
</head>
<body>
<div class="layui-inline" id="test-n1"></div>
<script type="text/javascript" src="../../layui/layui.js" ></script>
<script>
layui.use('laydate', function(){
var laydate = layui.laydate;
//执行一个laydate实例
laydate.render({
elem: '#test-n1'
,position: 'static'
});
});
</script>
</body>
</html>