.mainbody{ width: 980px; height: 1200px; margin: auto; } .classbox{ display: inline-block; margin-top: 95px; width: 450px; background-color: 236 236 236; border-bottom: skyblue 6px solid; background-color: lightgray; border-radius: 5px; margin-left: 8px; } .title{ background-color: skyblue; color: #fff; width: 450px; height: 80px; text-align: center; line-height: 80px; border-radius: 5px; margin-top: -25px; } .swbtn{ display: inline-block; width: 95px; height: 50px; border-radius: 5px; margin: 5px 5px; background-color: #fff; line-height: 50px; text-align: center; } .classbox p{ height: 100%; font-size: 20px; text-indent: 2em; line-height: 35px; padding: 0 10px; background-color: skyblue; margin: 0 10px; }