佳木斯湛栽影视文化发展公司

主頁 > 知識庫 > Html制作簡單而漂亮的登錄頁面

Html制作簡單而漂亮的登錄頁面

熱門標簽:智能手機 百度競價點擊價格的計算公式 使用U盤裝系統(tǒng) 網(wǎng)站建設 美圖手機 硅谷的囚徒呼叫中心 阿里云 檢查注冊表項

先來看看樣子。

html源碼:

XML/HTML Code復制內(nèi)容到剪貼板
  1. <!DOCTYPE html>  
  2. <html lang="en">  
  3. <head>  
  4.     <meta charset="UTF-8">  
  5.     <title>Login</title>  
  6.     <link rel="stylesheet" type="text/css" href="Login.css"/>  
  7. </head>  
  8. <body>  
  9.     <div id="login">  
  10.         <h1>Login</h1>  
  11.         <form method="post">  
  12.             <input type="text" required="required" placeholder="用戶名" name="u"></input>  
  13.             <input type="password" required="required" placeholder="密碼" name="p"></input>  
  14.             <button class="but" type="submit">登錄</button>  
  15.         </form>  
  16.     </div>  
  17. </body>  
  18. </html>  

css代碼:

CSS Code復制內(nèi)容到剪貼板
  1. html{   
  2.     width: 100%;   
  3.     height: 100%;   
  4.     overflowhidden;   
  5.     font-stylesans-serif;   
  6. }   
  7. body{   
  8.     width: 100%;   
  9.     height: 100%;   
  10.     font-family'Open Sans',sans-serif;   
  11.     margin: 0;   
  12.     background-color#4A374A;   
  13. }   
  14. #login{   
  15.     positionabsolute;   
  16.     top: 50%;   
  17.     left:50%;   
  18.     margin: -150px 0 0 -150px;   
  19.     width300px;   
  20.     height300px;   
  21. }   
  22. #login h1{   
  23.     color#fff;   
  24.     text-shadow:0 0 10px;   
  25.     letter-spacing1px;   
  26.     text-aligncenter;   
  27. }   
  28. h1{   
  29.     font-size: 2em;   
  30.     margin: 0.67em 0;   
  31. }   
  32. input{   
  33.     width278px;   
  34.     height18px;   
  35.     margin-bottom10px;   
  36.     outlinenone;   
  37.     padding10px;   
  38.     font-size13px;   
  39.     color#fff;   
  40.     text-shadow:1px 1px 1px;   
  41.     border-top1px solid #312E3D;   
  42.     border-left1px solid #312E3D;   
  43.     border-right1px solid #312E3D;   
  44.     border-bottom1px solid #56536A;   
  45.     border-radius: 4px;   
  46.     background-color#2D2D3F;   
  47. }   
  48. .but{   
  49.     width300px;   
  50.     min-height20px;   
  51.     displayblock;   
  52.     background-color#4a77d4;   
  53.     border1px solid #3762bc;   
  54.     color#fff;   
  55.     padding9px 14px;   
  56.     font-size15px;   
  57.     line-heightnormal;   
  58.     border-radius: 5px;   
  59.     margin: 0;   
  60. }  

總結:

復制代碼
代碼如下:
<input type="text" required="required" **placeholder="用戶名"** name="u"></input>
<input type="password" required="required" **placeholder="密碼"** name="p"></input>

placeholder="用戶名"的作用:占位符

以上就是本文的全部內(nèi)容,希望對大家的學習有所幫助。

標簽:煙臺 通遼 湖北 懷化 湘潭 山南 黃山 賀州

巨人網(wǎng)絡通訊聲明:本文標題《Html制作簡單而漂亮的登錄頁面》,本文關鍵詞  ;如發(fā)現(xiàn)本文內(nèi)容存在版權問題,煩請?zhí)峁┫嚓P信息告之我們,我們將及時溝通與處理。本站內(nèi)容系統(tǒng)采集于網(wǎng)絡,涉及言論、版權與本站無關。
  • 相關文章
  • 收縮
    • 微信客服
    • 微信二維碼
    • 電話咨詢

    • 400-1100-266
    江山市| 北京市| 平山县| 赫章县| 庐江县| 张家界市| 淮阳县| 常宁市| 黎川县| 江都市| 博湖县| 南郑县| 会昌县| 乌拉特中旗| 鄂托克旗| 雷波县| 福州市| 南郑县| 安远县| 读书| 义乌市| 拉萨市| 河津市| 南部县| 额敏县| 苏尼特右旗| 耿马| 墨脱县| 乐都县| 黄平县| 西昌市| 都匀市| 岚皋县| 犍为县| 秦安县| 贵德县| 新津县| 格尔木市| 东明县| 古浪县| 辽宁省|