先來看看樣子。
html源碼:
!DOCTYPE html html lang= en head meta charset= UTF-8 title Login /title link rel= stylesheet type= text/css href= Login.css / /head body p id= login h1 Login /h1 form method= post input type= text required= required placeholder= 用戶名 name= u /input input type= password required= required placeholder= 密碼 name= p /input button >css代碼:
html{ width: 100%; height: 100%; overflow: hidden; font-style: sans-serif; body{ width: 100%; height: 100%; font-family: Open Sans ,sans-serif; margin: 0; background-color: #4A374A; #login{ position: absolute; top: 50%; left:50%; margin: -150px 0 0 -150px; width: 300px; height: 300px; #login h1{ color: #fff; text-shadow:0 0 10px; letter-spacing: 1px; text-align: center; font-size: 2em; margin: 0.67em 0; input{ width: 278px; height: 18px; margin-bottom: 10px; outline: none; padding: 10px; font-size: 13px; color: #fff; text-shadow:1px 1px 1px; border-top: 1px solid #312E3D; border-left: 1px solid #312E3D; border-right: 1px solid #312E3D; border-bottom: 1px solid #56536A; border-radius: 4px; background-color: #2D2D3F; .but{ width: 300px; min-height: 20px; display: block; background-color: #4a77d4; border: 1px solid #3762bc; color: #fff; padding: 9px 14px; font-size: 15px; line-height: normal; border-radius: 5px; margin: 0; }總結(jié)
代碼如下:
input type= text required= required **placeholder= 用戶名 ** name= u /input input type= password required= required **placeholder= 密碼 ** name= p /inputplaceholder= 用戶名 的作用:占位符
以上就是本文的全部內(nèi)容,希望對大家的學(xué)習(xí)有所幫助,更多相關(guān)內(nèi)容請關(guān)注PHP !
相關(guān)推薦:
Html的a標(biāo)簽中href和onclick用法區(qū)別以及優(yōu)先級別
HTML的表格布局
以上就是使用Html制作簡單登錄頁面的方法的詳細(xì)內(nèi)容,html教程
鄭重聲明:本文版權(quán)歸原作者所有,轉(zhuǎn)載文章僅為傳播更多信息之目的,如作者信息標(biāo)記有誤,請第一時(shí)間聯(lián)系我們修改或刪除,多謝。
新聞熱點(diǎn)
疑難解答
圖片精選