开发者社区> 问答> 正文

CSS 日历样式

CSS 日历样式

展开
收起
游客ejnn55cgkof5g 2020-02-13 14:20:00 1119 0
1 条回答
写回答
取消 提交回答
  • 8.jpg 9.jpg CSS 代码: * {box-sizing:border-box;} ul {list-style-type: none;} body {font-family: Verdana,sans-serif;}

    .month { padding: 70px 25px; width: 100%; background: #1abc9c; }

    .month ul { margin: 0; padding: 0; }

    .month ul li { color: white; font-size: 20px; text-transform: uppercase; letter-spacing: 3px; }

    .month .prev { float: left; padding-top: 10px; }

    .month .next { float: right; padding-top: 10px; }

    .weekdays { margin: 0; padding: 10px 0; background-color: #ddd; }

    .weekdays li { display: inline-block; width: 13.6%; color: #666; text-align: center; }

    .days { padding: 10px 0; background: #eee; margin: 0; }

    .days li { list-style-type: none; display: inline-block; width: 13.6%; text-align: center; margin-bottom: 5px; font-size:12px; color: #777; }

    .days li .active { padding: 5px; background: #1abc9c; color: white !important }

    /* 添加不同尺寸屏幕的样式 */ @media screen and (max-width:720px) { .weekdays li, .days li {width: 13.1%;} }

    @media screen and (max-width: 420px) { .weekdays li, .days li {width: 12.5%;} .days li .active {padding: 2px;} }

    @media screen and (max-width: 290px) { .weekdays li, .days li {width: 12.2%;} }

    2020-02-13 14:20:36
    赞同 展开评论 打赏
问答分类:
问答标签:
问答地址:
问答排行榜
最热
最新

相关电子书

更多
零基础CSS入门教程 立即下载
低代码开发师(初级)实战教程 立即下载
阿里巴巴DevOps 最佳实践手册 立即下载