css实现课程表效果

效果图如下

代码如下

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
 
    <style>
        *{
            padding: 0;
            margin: 0;
            border: 0;
            box-sizing: border-box;
            -webkit-font-smoothing: antialiased;
            font-family: PingFang SC,Hiragino Sans GB,Arial,Microsoft YaHei,Verdana,Roboto,Noto,Helvetica Neue,sans-serif!important;
        }
        html,body{
            /* width: 100%; */
            /* height: 100%; */
        }
        .clearfix:after{/*伪元素是行内元素 正常浏览器清除浮动方法*/
            content: "";
            display: block;
            height: 0;
            clear:both;
            visibility: hidden;
        }
        .clearfix{
            *zoom: 1;/*ie6清除浮动的方式 *号只有IE6-IE7执行,其他浏览器不执行*/
        }
        .box{
            position: relative;
            margin: 0 auto;
            width: 1186px;
            height: 843px;
            background-color: #b6ddce;
            font-weight: bold;
        }
        .content{
            position: absolute;
            width: 1135px;
            height: 797px;
            top:50%;
            left: 50%;
            transform: translate(-50%,-50%);
            border:10px solid #5c8d89 ;
            border-radius: 20px;
        }
        .title{
            float: left;
            height: 669px;
            width: 115px;
            margin-left: 63px;
            margin-top:52px;
            padding-top: 95px;
            padding-left: 20px;
            letter-spacing: 20px;
            background-color: #5c8d89;
            border-radius: 9px;
            writing-mode: vertical-lr;
            color: #f3f5f7;
            font-size: 50px;
            
        }
        .table{
            float: left;
            width: 800px;
            height: 680px;
            margin-left :70px ;
            margin-top: 45px;
            font-size: 25px;
        }
        .table div,li{
            border-radius: 15px;
        }
        .info div{
            float: left;
            width: 376px;
            height: 87px;
            background-color: #fff;
            color: #a7d7c5;
            
            font-weight: bold;
            text-align: center;
            line-height: 87px;
        }
        .schedule{
            margin-right: 40px;
        }
        .week{
            height: 77px;
            background-color: #5c8d89;
            margin-top: 30px;
            padding-left: 15px;
            margin-bottom: 33px;
        }
        .week li{
            float: left;
            list-style-type: none;
            line-height: 77px;
            margin: 0 50px;
            font-style: italic;
            color: #fff;
        }
        .course li{
            float: left;
            list-style-type: none;
            height: 450px;
            width: 150px;
            margin-right: 11px;
            background-color: #fff;
        }
        .course li:last-child{
            margin-right: 0;
        }
    </style>
</head>
<body>
    <div class="box">
        <div class="content">
            <div class="title">咔咔学院课程表</div>
            <div class="table">
                <div class="info clearfix">
                    <div class="schedule">CLASS SCHEDULE</div>
                    <div class="name">NAME ______________</div>
                </div>
                <div class="week">
                    <ul>
                        <li>Mon</li>
                        <li>Tue</li>
                        <li>Wed</li>
                        <li>Tours</li>
                        <li>Fri</li>
                    </ul>
                </div>
                <div class="course">
                    <ul>
                        <li></li>
                        <li></li>
                        <li></li>
                        <li></li>
                        <li></li>
                    </ul>
                </div>
            </div>
        </div>
    </div>
</body>
</html>
 

 

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值