效果: ...
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>任務七</title> <link rel="stylesheet" href="index.css" type="text/css"> </head> <body> <div class="header"> <img src="images/logo.png" alt="logo" class="logo"> <span class="logo-wenzi">New World</span> <nav class="header-list"> <a href="#">首頁</a> <a href="#">最新活動</a> <a href="#">項目介紹</a> <a href="#">愛心社區</a> <a href="#">關於我們</a> <a href="#"><img src="images/login.png" alt="login" class="login-logo"><span class="login">登錄</span></a> </nav> </div> <div class="content"> <img src="images/picture1.png" alt="picture1" class="picture1"><img src="images/picture1_hidden.png" alt="圖一遮蓋圖片" class="picture1_hidden"> <div class="content1-weizi"> <p class="content1-weizi-one">Time of new life</p> <p class="content1-weizi-two">新時代,年輕的人們讓我們一起</p> <p class="content1-weizi-two">體驗新生活,享受新生活</p> <a href="#" class="content1-weizi-three">開始體驗</a> </div> <nav class="content-two clearfix"> <div class="content-two-image"> <img src="images/content_two-one.png" alt="content_two-one"> </div> <div class="content-two-image"> <img src="images/content_two-two.png" alt="content_two-one"> </div> <div class="content-two-image"> <img src="images/content_two-three.png" alt="content_two-one"> </div> <div class="content-two-image"> <img src="images/content_two-four.png" alt="content_two-one"> </div> </nav> <div class="content-two-wenzi clearfix"> <div><p>打造全新世界,讓你更愛你的生活</p></div> <div><p>豐富多彩的公益活動,發揮新世界的主人公意識</p></div> <div><p>時尚的新理念,超前體驗未知的生活</p></div> <div><p>完善的培養機制,培養你全新的世界觀</p></div> </div> <div class="content-three"> <p class="content-three-title">成為我們的志願者</p> <div class="hr-one"></div> <div class="content-three-title-detail"><p>新世界的大家庭需要每一個愛生活的人加入,如果你夠年輕有夢想,有激情,那就不要猶豫快來加入我們,成為改變所有人生活的人</p></div> </div> <div class="detail clearfix"> <div class="detail-left"> <p class="detail-left-title">新世界志願者協議</p> <p class="detail-left-detail">加入新世界志願者的人員必須遵守中華人民共共和國的 相關法律法規,並且本著平等資源的原則 ......</p> <div class="more"><img src="images/jiantou.png" alt="箭頭"><a href="#">more</a></div> <p class="detail-left-title">新世界志願者協議</p> <p class="detail-left-detail">加入新世界志願者的人員必須遵守中華人民共共和國的 相關法律法規,並且本著平等資源的原則 ......</p> <div class="more"><img src="images/jiantou.png" alt="箭頭"><a href="#">more</a></div> <p class="detail-left-title">新世界志願者協議</p> <p class="detail-left-detail">加入新世界志願者的人員必須遵守中華人民共共和國的 相關法律法規,並且本著平等資源的原則 ......</p> <div class="more"><img src="images/jiantou.png" alt="箭頭"><a href="#">more</a></div> </div> <div class="detail-right clearfix"> <input type="text" placeholder="姓名:" style="border:none;background-color: #ededef;width: 311px;height: 41px;text-indent: 20px" class="inner"> <input type="text" placeholder="年齡:" style="border:none;background-color: #ededef;width: 311px;height: 41px;text-indent: 20px" class="inner"> <input type="text" placeholder="聯繫方式:" style="border:none;background-color: #ededef;width: 311px;height: 41px;text-indent: 20px" class="inner"> <input type="text" placeholder="聯繫地址:" style="border:none;background-color: #ededef;width: 311px;height: 41px;text-indent: 20px" class="inner"> <input type="textarea" placeholder="簡述你夢想生活" style="border:none;background-color: #ededef;width: 724px;height: 177px;text-indent: 20px" class="inner"> <input type="button" value="提交" class="btn"> </div> </div> </div> <div class="footer"> <p class="footer-title">聯繫我們</p> <p class="footer-detail">為了更好的獲取我們最新的產品資訊,您可以留下您的電子郵箱快速訂閱我們的產品資訊 也可以通過以下任何方式關註我們動態</p> <div class="footer-email clearfix"> <input type="text" placeholder="[email protected]" class="email"> <input type="button" value="提交" class="btn-two"> </div> <div class="footer-icon"> <img src="images/footer-one.png" alt="QQ" class="footer-icon-inner"> <img src="images/footer-two.png" alt="Weibo" class="footer-icon-inner"> <img src="images/footer-three.png" alt="Facebook" class="footer-icon-inner"> <img src="images/footer-four.png" alt="Google" class="footer-icon-inner"> </div> </div> </body> </html>
/*通用*/ *{padding: 0;margin: 0;border: 0} .clearfix:after{content:".";display:block;height:0;clear:both;visibility:hidden} .clearfix{*+height:1%;} /*header*/ .header{width: 100%;height: 56px;margin: 0;background-color: #fff;} .logo{margin-left: 59px;margin-top: 12px} .logo-wenzi{font-size: 26px;font-family: Verdana;color: #393a3a;font-weight: bold;margin-left: 5px;} .header-list{float: right;margin-right: 68px;height: 56px;line-height: 56px;} .header-list a{padding:0 32px;text-decoration: none;height: 56px;display: block;float: left;font-size: 14px;font-family: "Microsoft YaHei";color: #787b83} .header-list a:hover{border-bottom: 5px solid #e74f4d;color: #e74f4d;box-sizing: border-box} .login-logo{margin-right: 5px;vertical-align: middle} .login{vertical-align: middle;color: #e74f4d} /*content*/ .picture1{width: 100%;height: 692px} .content{position: relative} .picture1_hidden{width: 100%;position: absolute;left: 0;top: 0;height: 692px} .content1-weizi{position: absolute;left: 115px;top: 231px} .content1-weizi-one{font-size: 60px;font-family: "Microsoft YaHei";color: #fff;margin-bottom: 32px} .content1-weizi-two{color: #fff;font-size: 21px;font-family: "Microsoft YaHei";padding-bottom: 10px;padding-left: 10px} .content1-weizi-three{font-size: 30px;display: block;text-decoration: none;font-family: 微軟雅黑;color: #fff;text-align: center;line-height: 64px} .content1-weizi a{height: 64px;width: 330px;margin-top: 67px;background-color: #e7504d} .content1-weizi a:hover{border-bottom: 3px solid #fff;box-sizing: border-box} /*content-two*/ .content-two-image{display: block;width: 25%;float: left;margin-top: 46px} .content-two-image img{margin-left: 153px} .content-two-wenzi div p{font-size: 14px;font-family: 黑體;color: #767777;text-align: center;padding: 0 25%} .content-two-wenzi{margin-top: 48px} .content-two-wenzi div{width: 25%;float: left;border-right: solid 2px #bbb;box-sizing: border-box} .content-two-wenzi div:last-child{border: none} /*content-three*/ .content-three{margin-bottom: 106px} .content-three-title{font-size: 21px;font-family: 黑體;color: #323333;text-align: center;margin-top: 120px} .hr-one{width: 30px;height: 2px;background-color: #ea6563;text-align: center;margin: 20px auto} .content-three-title-detail{margin: 0 35%} .content-three-title-detail p{font-size: 12px;font-family: "Microsoft YaHei";color: #aaa;text-align: center;line-height: 18px} .detail-left{float: left;padding-left: 140px;width: 287px;} .detail-left-title{font-size: 14px;font-family: 黑體;color: #aaa;font-weight: bold;margin-bottom: 21px} .detail-left-detail{font-size: 12px;color: #aaa;font-family: 宋體;line-height: 21px} .more a{font-size: 12px;line-height: 20px;color: #aaa;font-family: 宋體;margin-left: 5px;text-decoration: none;} .more a:hover{color: #e74f4d} .more{display: block;text-align: right;margin-bottom: 20px} .inner{float: left;margin:0 50px 14px 50px;} .btn{border: none;width: 724px;height: 40px;float: left;margin:0 50px 14px 50px;} .detail-right{margin-bottom: 167px} /*footer*/ .footer{background-color: #33363f;height: 358px} .footer-title{font-size: 21px;color: #fff;font-family: 黑體;text-align: center;padding-top: 90px} .footer-detail{font-size: 12px;font-family: 宋體;line-height: 18px;color: #fff;padding: 20px 30%;text-align: center} .footer-email{margin-top: 20px;margin-left: 31%;margin-bottom: 36px} .email{height: 41px;width: 430px;text-indent: 20px;border-style: none;} .btn-two{height: 41px;width: 80px;border-style: none;} .email,.btn-two{float: left;} .footer-icon{width: 180px;margin: 0 auto;} .footer-icon-inner{margin-right: 18px} .footer-icon img:last-child{margin-right: 0}
效果: