w-ui
Version:
A Vue.js 2.0 UI Toolkit for mobile
211 lines (206 loc) • 3.95 kB
text/less
@import '../../../src/styles/variables.less';
.calendar {
margin:auto;
width: 100%;
// min-width:300px;
background: #fff;
font-family: "PingFang SC","Hiragino Sans GB","STHeiti","Microsoft YaHei","WenQuanYi Micro Hei",sans-serif;
user-select:none;
}
.calendar-tools{
height:40px;
font-size: 20px;
line-height: 40px;
color: ;
}
.calendar-tools span{
cursor: pointer;
}
.calendar-prev{
width: 14.28571429%;
float:left;
text-align: center;
}
.calendar-info{
padding-top: 3px;
font-size:16px;
line-height: 1.3;
text-align: center;
}
.calendar-info>div.month{
margin:auto;
height:20px;
width:100px;
text-align: center;
color: @primary-color;
overflow: hidden;
position: relative;
}
.calendar-info>div.month .month-inner{
position: absolute;
left:0;
top:0;
height:240px;
transition:top .5s cubic-bezier(0.075, 0.82, 0.165, 1);
}
.calendar-info>div.month .month-inner>span{
display: block;
font-size: 14px;
height:20px;
width:100px;
overflow: hidden;
text-align: center;
}
.calendar-info>div.year{
font-size:10px;
line-height: 1;
color:#999;
}
.calendar-next{
width: 14.28571429%;
float:right;
text-align: center;
}
.calendar table {
clear: both;
width: 100%;
margin-bottom:10px;
border-collapse: collapse;
color: #444444;
}
.calendar td {
margin:2px ;
padding:0px 0;
width: 14.28571429%;
height:44px;
text-align: center;
vertical-align: middle;
font-size:14px;
line-height: 125%;
cursor: pointer;
position: relative;
vertical-align: top;
}
.calendar td.week{
font-size:10px;
pointer-events:none ;
cursor: default ;
}
.calendar td.disabled {
color: #ccc;
pointer-events:none ;
cursor: default ;
}
.calendar td.disabled div{
color: #ccc;
}
.calendar td span{
display:block;
max-width:40px;
height:26px;
font-size: 16px;
line-height:26px;
margin:0px auto;
border-radius:20px;
}
.calendar td:not(.selected) span:not(.red):hover{
background:#f3f8fa;
color:#444;
}
.calendar td:not(.selected) span.red:hover{
background:#f9efef;
}
.calendar td:not(.disabled) span.red{
color: @primary-color;
}
.calendar td.selected span{
background-color: @primary-color;
color: #fff;
}
.calendar td .text{
position: absolute;
top:28px;
left:0;
right:0;
text-align: center;
padding:2px;
font-size:8px;
line-height: 1.2;
color:#444;
}
.calendar td .isGregorianFestival,
.calendar td .isLunarFestival{
color:@primary-color;
}
.calendar td.selected span.red{
background-color: @primary-color;
color: #fff;
}
.calendar td.selected span.red:hover{
background-color: @primary-color;
color: #fff;
}
.calendar thead td {
text-transform: uppercase;
height:30px;
vertical-align: middle;
}
.calendar-button{
text-align: center;
}
.calendar-button span{
cursor: pointer;
display: inline-block;
min-height: 1em;
min-width: 5em;
vertical-align: baseline;
background: @primary-color;
color:#fff;
margin: 0 .25em 0 0;
padding: .6em 2em;
font-size: 1em;
line-height: 1em;
text-align: center;
border-radius: .3em;
}
.calendar-button span.cancel{
background:#efefef;
color:#666;
}
.calendar-years{
position: absolute;
left:0px;
top:60px;
right:0px;
bottom:0px;
background:#fff;
display: flex;
justify-content: center;
align-items: center;
flex-wrap:wrap;
overflow: auto;
transition:all .5s cubic-bezier(0.075, 0.82, 0.165, 1);
opacity: 0;
pointer-events: none;
transform: translateY(-10px);
}
.calendar-years.show{
opacity: 1;
pointer-events: auto;
transform: translateY(0px);
}
.calendar-years>span{
margin:1px 5px;
display: inline-block;
width:60px;
line-height: 30px;
border-radius: 20px;
text-align:center;
border:1px solid #fbfbfb;
color:#999;
}
.calendar-years>span.active{
border:1px solid @primary-color;
background-color: @primary-color;
color:#fff;
}