给定Demo:



于是乎开始了我的第一次前端Demo制作练习...

虽然写的时候意识到把布局写死了...

以后多用% 少用px


Demo.html:

<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title></title>
    <link rel="stylesheet" href="demo.css" type="text/css">
</head>
<body>
    <div class="content">
        <div class="part1">
            <div class="part1-1">
                <p class="part1-1-p1">30<p class="part1-1-p1-1">%</p></p>
                <p class="part1-1-p2">生源质量</p>
                <p class="part1-1-p3">新生高考成绩</p>
            </div>
            <div class="part1-2">
                <p class="part1-2-p1">15<p class="part1-2-p1-1">%</p></p>
                <p class="part1-2-p2">培养结果</p>
                <p class="part1-2-p3">毕业生就业率</p>
            </div>
            <div class="box1-1">
                <img src="1.jpg" class="pic1">
                <p class="p1">人才培养</p>
            </div>
            <div class="box1-2">
            </div>
        </div>
        <div class="part2">
            <div class="part2-1">
                <div class="box2-1-1">
                    <img src="2.jpg" class="pic2">
                    <p class="p1">科学研究</p>
                </div>
                <div class="box2-1-2">
                </div>
                <div class="part2-1-1">
                    <p class="part2-1-1-p1">10<p class="part2-1-1-p1-1">%</p></p>
                    <p class="part2-1-1-p2">科研规模</p>
                    <p class="part2-1-1-p3">论  文  数  量</p>
                </div>
                <div class="part2-1-2">
                    <p class="part2-1-2-p1">10<p class="part2-1-2-p1-1">%</p></p>
                    <p class="part2-1-2-p2">科研质量</p>
                    <p class="part2-1-2-p3">论  文  质  量</p>
                </div>
                <div class="part2-1-3">
                    <p class="part2-1-3-p1">10<p class="part2-1-3-p1-1">%</p></p>
                    <p class="part2-1-3-p2">顶尖论文</p>
                    <p class="part2-1-3-p3">高被引论文</p>
                </div>
                <div class="part2-1-4">
                    <p class="part2-1-4-p1">10<p class="part2-1-4-p1-1">%</p></p>
                    <p class="part2-1-4-p2">顶尖人才</p>
                    <p class="part2-1-4-p3">高被引学者</p>
                </div>

            </div>
            <div class="part2-2">
                <div class="box2-2-1">
                    <img src="3.jpg" class="pic3">
                    <p class="p3">服务社会</p>
                </div>
                <div class="box2-2-2">
                </div>
                <div class="box2-2-3">
                    <img src="1.jpg" class="pic4">
                    <p class="p4">国际化</p>
                </div>
                <div class="box2-2-4">
                </div>
                <div class="part2-2-1">
                    <p class="part2-2-1-p1">5<p class="part2-2-1-p1-1">%</p></p>
                    <p class="part2-2-1-p2">科技服务</p>
                    <p class="part2-2-1-p3">企业科研经费</p>
                </div>
                <div class="part2-2-2">
                    <p class="part2-2-2-p1">5<p class="part2-2-2-p1-1">%</p></p>
                    <p class="part2-2-2-p2">成果转化</p>
                    <p class="part2-2-2-p3">技术转让收入</p>
                </div>
                <div class="part2-2-3">
                    <p class="part2-2-3-p1">5<p class="part2-2-3-p1-1">%</p></p>
                    <p class="part2-2-3-p2">学生国际化</p>
                    <p class="part2-2-3-p3">留 学 生 比 例</p>
                </div>
            </div>
        </div>
    </div>
</body>
</html>


Demo.css:

.content{
        width: 800px;
        height: 650px;
        padding: 3px;
        /*border: 1px solid black;*/
    }
    .part1{
        width: 44%;
        height: 100%;
        float: left;
        padding-right: 3px;
        padding-left: 2px;
    }
    .box1-1{
        width: 75px;
        height: 75px;
        background-color: white;
        transform: rotate(45deg);
        border: 2px solid white;
        position: absolute;
        margin-left: 135px;
        margin-top: 410px;
    }
    .box1-2{
        width: 82px;
        height: 82px;
        opacity: 1;
        transform: rotate(45deg);
        border: 3px solid white;
        position: absolute;
        margin-left: 130.5px;
        margin-top: 406px;
    }
    .pic1{
        width: 30px;
        height: 30px;
        position: absolute;
        transform: rotate(-45deg);
        margin-top: 10px;
        margin-left: 10px;
    }
    .p1{
        transform: rotate(-45deg);
        font-family: Helvetica;
        font-weight:600;
        font-size: 15px;
        margin-top: 35px;
        margin-left: 15px;
    }
    .part2{
        width: 55%;
        height: 100%;
        float: left;
        padding-left: 2px;
    }
    .part1-1{
        width: 100%;
        height: 69%;
        background-color: crimson;
        float: left;
        box-sizing: border-box;
        margin-bottom: 3px;
    }
    .part1-1-p1{
        font-size: 70px;
        text-align: center;
        margin-bottom:-10px;
        color: white;
        font-family: cursive;
        display: inline;
        margin-left: 125px;
        line-height: 150px;
    }
    .part1-1-p1-1{
        font-size: 35px;
        color: white;
        font-family: Helvetica;
        display: inline;
    }
    .part1-1-p2{
        font-size: 25px;
        text-align: center;
        margin-top: -60px;
        margin-bottom: -1px;
        color: white;
        font-family: Arial, Helvetica, sans-serif;
    }
    .part1-1-p3{
        font-size: 17px;
        text-align: center;
        margin-top: 0;
        color: white;
        font-weight: 100;
    }
    .part1-2{
         width: 100%;
         height:29.8%;
         background-color: palevioletred;
         float: left;
         box-sizing: border-box;
         margin-top: 2px;
     }
    .part1-2-p1{
        font-size: 70px;
        text-align: center;
        margin-bottom:-10px;
        color: white;
        font-family: cursive;
        display: inline;
        margin-left: 125px;
        line-height: 180px;
    }
    .part1-2-p1-1{
        font-size: 35px;
        color: white;
        font-family: Helvetica;
        display: inline;
    }
    .part1-2-p2{
        font-size: 25px;
        text-align: center;
        margin-top: -78px;
        margin-bottom: -1px;
        color: white;
        font-family: Arial, Helvetica, sans-serif;
    }
    .part1-2-p3{
        font-size: 17px;
        text-align: center;
        margin-top: 0;
        color: white;
        font-weight: 100;
    }
    .part2-1{
        width: 100%;
        height: 73%;
        float: left;
        margin-bottom: 2px;
    }
    .part2-2{
        width: 99.5%;
        height: 26%;
        float: left;
        margin-top: 2px;
    }
    .part2-1-1{
        width: 49%;
        height: 50%;
        background-color: mediumseagreen;
        float: left;
        margin-bottom: 2px;
        margin-right: 3px;
    }
    .box2-1-1{
        width: 75px;
        height: 75px;
        background-color: white;
        transform: rotate(45deg);
        border: 2px solid white;
        position: absolute;
        margin-left: 178px;
        margin-top: 200px;
    }
    .box2-1-2{
        width: 82px;
        height: 82px;
        opacity: 1;
        transform: rotate(45deg);
        border: 3px solid white;
        position: absolute;
        margin-left: 173.5px;
        margin-top: 196px;
    }
    .pic2{
        width: 30px;
        height: 30px;
        position: absolute;
        transform: rotate(-45deg);
        margin-top: 10px;
        margin-left: 10px;
    }
    .p2{
        transform: rotate(-45deg);
        font-family: Helvetica;
        font-weight:600;
        font-size: 15px;
        margin-top: 35px;
        margin-left: 15px;
    }
    .part2-1-1-p1{
        font-size: 70px;
        text-align: center;
        margin-bottom:-10px;
        color: white;
        font-family: cursive;
        display: inline;
        margin-left: 55px;
        line-height: 180px;
    }
    .part2-1-1-p1-1{
        font-size: 35px;
        color: white;
        font-family: Helvetica;
        display: inline;
    }
    .part2-1-1-p2{
        font-size: 25px;
        text-align: center;
        margin-top: -80px;
        margin-bottom: -1px;
        color: white;
        font-family: Arial, Helvetica, sans-serif;
    }
    .part2-1-1-p3{
        font-size: 17px;
        text-align: center;
        margin-top: 0;
        color: white;
        font-weight: 100;
    }
    .part2-1-2{
        width: 49.5%;
        height: 50%;
        background-color: darkcyan;
        float: left;
        margin-bottom: 2px;
        margin-left: 2px;
    }
    .part2-1-2-p1{
        font-size: 70px;
        text-align: center;
        margin-bottom:-10px;
        color: white;
        font-family: cursive;
        display: inline;
        margin-left: 55px;
        line-height: 180px;
    }
    .part2-1-2-p1-1{
        font-size: 35px;
        color: white;
        font-family: Helvetica;
        display: inline;
    }
    .part2-1-2-p2{
        font-size: 25px;
        text-align: center;
        margin-top: -80px;
        margin-bottom: -1px;
        color: white;
        font-family: Arial, Helvetica, sans-serif;
    }
    .part2-1-2-p3{
        font-size: 17px;
        text-align: center;
        margin-top: 0;
        color: white;
        font-weight: 100;
    }
    .part2-1-3{
        width: 49%;
        height: 49.5%;
        background-color: skyblue;
        float: left;
        margin-top: 2px;
        margin-right: 3px;
    }
    .part2-1-3-p1{
        font-size: 70px;
        text-align: center;
        margin-bottom:-10px;
        color: white;
        font-family: cursive;
        display: inline;
        margin-left: 55px;
        line-height: 180px;
    }
    .part2-1-3-p1-1{
        font-size: 35px;
        color: white;
        font-family: Helvetica;
        display: inline;
    }
    .part2-1-3-p2{
        font-size: 25px;
        text-align: center;
        margin-top: -80px;
        margin-bottom: -1px;
        color: white;
        font-family: Arial, Helvetica, sans-serif;
    }
    .part2-1-3-p3{
        font-size: 17px;
        text-align: center;
        margin-top: 0;
        color: white;
        font-weight: 100;
    }
    .part2-1-4{
        width: 49.5%;
        height: 49.5%;
        background-color: dodgerblue;
        float: left;
        margin-top: 2px;
        margin-left: 2px;
    }
    .part2-1-4-p1{
        font-size: 70px;
        text-align: center;
        margin-bottom:-10px;
        color: white;
        font-family: cursive;
        display: inline;
        margin-left: 55px;
        line-height: 180px;
    }
    .part2-1-4-p1-1{
        font-size: 35px;
        color: white;
        font-family: Helvetica;
        display: inline;
    }
    .part2-1-4-p2{
        font-size: 25px;
        text-align: center;
        margin-top: -80px;
        margin-bottom: -1px;
        color: white;
        font-family: Arial, Helvetica, sans-serif;
    }
    .part2-1-4-p3{
        font-size: 17px;
        text-align: center;
        margin-top: 0;
        color: white;
        font-weight: 100;
    }
    .part2-2-1{
        width: 32.5%;
        height: 100%;
        background-color: orange;
        float: left;
        margin-right: 2px;
    }
    .box2-2-1{
        width: 60px;
        height: 60px;
        background-color: white;
        transform: rotate(45deg);
        border: 2px solid white;
        position: absolute;
        margin-left:112.9px;
        margin-top: 13px;
    }
    .box2-2-2{
        width: 66.5px;
        height: 66.5px;
        opacity: 1;
        transform: rotate(45deg);
        border: 2px solid white;
        position: absolute;
        margin-left: 109.5px;
        margin-top: 10px;
    }
    .pic3{
        width: 25px;
        height: 25px;
        position: absolute;
        transform: rotate(-45deg);
        margin-top: 4px;
        margin-left: 5px;
    }
    .p3{
        transform: rotate(-45deg);
        font-family: Helvetica;
        font-weight:600;
        font-size: 1px;
        margin-top: 25px;
        /*margin-left: 15px;*/
        /*text-align: center;*/
        margin-left: 6px;
    }
    .box2-2-3{
        width: 60px;
        height: 60px;
        background-color: white;
        transform: rotate(45deg);
        border: 2px solid white;
        position: absolute;
        margin-left:373px;
        margin-top: 13px;
    }
    .box2-2-4{
        width: 66.5px;
        height: 66.5px;
        opacity: 1;
        transform: rotate(45deg);
        border: 2px solid white;
        position: absolute;
        margin-left: 369.5px;
        margin-top: 10px;
    }
    .pic4{
        width: 25px;
        height: 25px;
        position: absolute;
        transform: rotate(-45deg);
        margin-top: 4px;
        margin-left: 5px;
    }
    .p4{
        transform: rotate(-45deg);
        font-family: Helvetica;
        font-weight:600;
        font-size: 1px;
        margin-top: 20px;
        /*margin-left: 15px;*/
        /*text-align: center;*/
        margin-left: 12px;
    }
    .part2-2-1-p1{
        font-size: 60px;
        text-align: center;
        margin-bottom:-10px;
        color: white;
        font-family: cursive;
        display: inline;
        margin-left: 40px;
        line-height: 160px;
    }
    .part2-2-1-p1-1{
        font-size: 35px;
        color: white;
        font-family: Helvetica;
        display: inline;
    }
    .part2-2-1-p2{
        font-size: 20px;
        text-align: center;
        margin-top: -70px;
        margin-bottom: -1px;
        color: white;
        font-family: Arial, Helvetica, sans-serif;
    }
    .part2-2-1-p3{
        font-size: 13px;
        text-align: center;
        margin-top: 0;
        color: white;
        font-weight: 100;
    }
    .part2-2-2{
        width: 32.5%;
        height: 100%;
        background-color: chocolate;
        float: left;
        margin-right: 2px;
    }
    .part2-2-2-p1{
        font-size: 60px;
        text-align: center;
        margin-bottom:-10px;
        color: white;
        font-family: cursive;
        display: inline;
        margin-left: 40px;
        line-height: 160px;
    }
    .part2-2-2-p1-1{
        font-size: 35px;
        color: white;
        font-family: Helvetica;
        display: inline;
    }
    .part2-2-2-p2{
        font-size: 20px;
        text-align: center;
        margin-top: -70px;
        margin-bottom: -1px;
        color: white;
        font-family: Arial, Helvetica, sans-serif;
    }
    .part2-2-2-p3{
        font-size: 13px;
        text-align: center;
        margin-top: 0;
        color: white;
        font-weight: 100;
    }
    .part2-2-3{
        width: 33.8%;
        height: 100%;
        background-color:  blueviolet;
        float: left;
    }
    .part2-2-3-p1{
        font-size: 60px;
        text-align: center;
        margin-bottom:-10px;
        color: white;
        font-family: cursive;
        display: inline;
        margin-left: 40px;
        line-height: 160px;
    }
    .part2-2-3-p1-1{
        font-size: 35px;
        color: white;
        font-family: Helvetica;
        display: inline;
    }
    .part2-2-3-p2{
        font-size: 20px;
        text-align: center;
        margin-top: -70px;
        margin-bottom: -1px;
        color: white;
        font-family: Arial, Helvetica, sans-serif;
    }
    .part2-2-3-p3{
        font-size: 13px;
        text-align: center;
        margin-top: 0;
        color: white;
        font-weight: 100;
    }


效果图(凑活着还能看得过去吧....)