HTML與CSS簡單頁面效果執行個體

來源:互聯網
上載者:User

標籤:

本篇部落格實現一個HTML與CSS簡單頁面效果執行個體

index.html

 1 <!DOCTYPE html> 2 <html> 3 <head> 4 <meta charset="UTF-8"> 5 <title>Insert title here</title> 6 <link href="style.css" rel="stylesheet" type="text/css"> 7 </head> 8 <body> 9     <div class="container">10         <div class="wrapper">11             <div class="heading">12                <div class="heading_nav">13                    <div class="heading_title">14                                                    極客學院15                        </div>16                        <div class="heading_navbar">17                            <ul>18                                <li><a href="#">首頁</a></li>19                                <li><a href="#">職業課程</a></li>20                                <li><a href="#">技術問答</a></li>21                                <li><a href="#">VIP會員</a></li>22                            </ul>23                        </div>24                        <div class="heading_img">25                            <img src="img.jpg">26                        </div>27                        <div class="heading_soptlight">28                           <form>29                              <input type="text">30                           </form>31                        </div>32                </div>33             </div>34             <div class="body">35                 <div class="body_title">36                   <h3>熟悉極客學院</h3>37                   <p>加入極客學院,學習最新實戰教程,全面提升你的技術能力</p>38                 </div>39                  <hr/>40             <hr/>41             </div>42            43         </div>44         45         <div class="footing">46            @極客學院47         </div>48     49     </div>50 </body>51 </html>

 

css代碼:

 1 *{ 2     margin:0px; 3     padding:0px; 4 } 5  6 body{ 7     background-color: snow; 8 } 9 .wrapper{10     width:80%;11     height:1000px;12     background-color: antiquewhite;13     margin:0px auto;14 }15 .heading{16     width:100%;17     height:160px;18     background-color: snow;19     margin:0px auto;20 }21 ul{22     margin-left:40px;23     float:left;24     list-style-type:none;25     padding-top:40px;26     padding-bottom:6px;27 }28 a:link,a:visited{29     font-weight:bold;30     color:darkgray;31     text-align:center;32     padding:6px;33     text-decoration: none;34 }35 a:hover,a:active{36     color:blue;37 }38 .heading_title{39     float:left;40     font-family:Arial,Helvetica,sans-serif;41     font-size:30px;42     color:burlywood;43 }44 .heading_nav{45     padding-bottom:30px;46     padding-top:30px;47     width:100%;48     height:30px;49     position:relative;50 }51 li{52     padding-left:10px;53     display:inline;54 }55 56 .heading_img img{57     border-radius:30px;58     display:inline;59     width:46px;60     height:46px;61     box-shadow:0 1px 1px rgba(0,0,0,0.2);62     float:right;63 }64 65 .heading_soptlight form{66     float:right;67     width:100px;68     height:26px;69     position:relative;70     margin-right:82px;71     margin-top:16px;72 }73 form input{74     height:26px;75     border-radius:30px;76 }77 .body{78     width:auto;79     height:auto;80     padding:30px;81 }82 .body_title h3{83     font-size:30px;84     font-family:Arial,Helvetical,sans-serif;85     color:#333333;86 }87 .body_title p{88     margin-top:20px;89     margin-bottom:20px;90 }91 .footing{92     padding-top:20px;93     text-align:center;94     fon-size:10px;95     color:darkgray;96 }

 

效果:

HTML與CSS簡單頁面效果執行個體

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.