Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- *利用深度选择器来修改引入的日历组件的样式 /deep/
- */
- .date-picker{
- /deep/ .ivu-date-picker-cells-header span {
- line-height: 26px;
- text-align: center;
- margin: 3px 9px; /*$$7px*/
- color: #bbbec4;
- }
- /deep/ .ivu-date-picker-cells span {
- display: inline-block;
- width: 26px;
- height: 26px;
- margin: 3px 9px; /*$$7px*/
- }
- /deep/ .ivu-select-dropdown {
- width: inherit;
- max-height: 400px;
- overflow: auto;
- margin: 5px 0;
- padding: 5px 0;
- background-color: #fff;
- box-sizing: border-box;
- border-radius: 0px;
- box-shadow: 0 0px 0px rgba(0, 0, 0, 0.2); /**/
- position: absolute;
- z-index: 900;
- }
- /**
- *修改日的em背景框的大小
- */
- /deep/ .ivu-date-picker-cells span em {
- display: inline-block;
- width: 19px;
- height: 19px;
- line-height: 20px;
- padding: 0px 0.4px 0px 0px;
- margin: 2px;
- font-style: normal;
- border-radius: 50%; /* 移入em时 border-radius: 50%; */
- text-align: center;
- transition: all .2s ease-in-out;
- }
- /**
- *修改年的em背景框的大小
- */
- /deep/ .ivu-date-picker-cells-year span em{
- width: 40px;
- height: 28px;
- line-height: 28px;
- margin: 0;
- }
- /**
- *修改月的em背景框的大小
- */
- /deep/.ivu-date-picker-cells-month span em {
- width: 30px;
- height: 26px;
- line-height: 26px;
- margin: 0;
- }
- /**
- *消除当前年、月的蓝色阴影
- */
- /deep/ .ivu-date-picker-cells-year .ivu-date-picker-cells-cell-focused{
- background-color: #fff;
- }
- /deep/ .ivu-date-picker-cells-year .ivu-date-picker-cells-cell-focused em{
- background-color: green;
- color: #fff;
- }
- /deep/ .ivu-date-picker-cells-month .ivu-date-picker-cells-cell-focused {
- background-color: #fff;
- }
- /deep/ .ivu-date-picker-cells-month .ivu-date-picker-cells-cell-focused em{
- background-color: green;
- color: #fff;
- }
- /deep/ .ivu-date-picker-cells-cell-selected em{
- background: green;
- color: #fff;
- border-radius: 50%;
- }
- // /deep/ .ivu-date-picker-cells-cell-selected em:after{
- // content: '选择';
- // display: block;
- // width: 28px;
- // height: 10px;
- // color: red;
- // background: #fff;
- // position: relative;
- // z-index: -100;
- // }
- /deep/ .ivu-date-picker-cells-focused em { /*消除当天日期的蓝色阴影*/
- -webkit-box-shadow: 0 0 0 1px rgb(181, 117, 241) inset;
- box-shadow: 0 0 0 0 rgb(181, 117, 241) inset;
- }
- /deep/ .ivu-date-picker-cells span:hover em{
- background: green;
- color: #fff;
- border-radius: 50%;
- }
- /deep/ .ivu-date-picker .ivu-select-dropdown {
- max-width: 340px; /*$$300px*/
- margin: auto;
- padding: 0;
- overflow: visible;
- max-height: none;
- }
- /deep/ .ivu-picker-panel-body {
- float: left;
- width: 340px; /*$$300px*/
- font-size: 13px;
- }
- /deep/ .ivu-date-picker-header {
- height: 40px; /*$$38px*/
- line-height: 40px;
- text-align: center;
- border-bottom: 1px solid #e9eaec;
- }
- /deep/ .ivu-date-picker-cells {
- width: 330px; /*$$280px*/
- margin: 10px;
- white-space: normal;
- }
- /deep/ .ivu-date-picker-cells-cell-today em { /*当前天文本颜色为白色*/
- color: #fff;
- background-color: rgb(181, 117, 241);
- }
- /deep/ .ivu-date-picker-cells-cell-today em:after { /* 当前天的样式--可以加图片等等。。*/
- content: url('../../../assets/images/calendar/today.png');
- display: block;
- width: 8px;
- height: 8px;
- color: red;
- border-radius: 50%;
- background: #fff;
- position: absolute;
- top: 15px;
- right: 6px;
- z-index: -100;
- }
- /deep/ :after, :before {
- box-sizing: border-box;
- }
- /deep/ .ivu-picker-panel-icon-btn {
- display: inline-block;
- width: 20px;
- height: 24px;
- line-height: 26px;
- margin-top: 8px; /*$$6px*/
- text-align: center;
- cursor: pointer;
- color: #bbbec4;
- -webkit-transition: color 0.2s ease-in-out;
- transition: color 0.2s ease-in-out;
- }
- }
Add Comment
Please, Sign In to add comment