1. 程式人生 > >Html(仿QQ登入WEB網頁編寫)小小記錄

Html(仿QQ登入WEB網頁編寫)小小記錄

1.autocomplete=”off”

input 的屬性autocomplete 預設為on ,其含義代表是否讓瀏覽器自動記錄之前輸入的值

2.< form target=”1”> target 屬性規定在何處開啟 action URL。

_blank 在新視窗中開啟。
_self 預設。在相同的框架中開啟。
_parent 在父框架集中開啟。
_top 在整個視窗中開啟。
framename 在指定的框架中開啟。

3.style=”margin: 0”

margin:auto; 這個是上右下左的值都是自適應的
margin:0; 這個是上右下左的值都為0

4.margin: 0 auto

.login_form {
width: 272px;
margin: 0 auto
}
margin後面如果只有兩個引數的話,第一個表示top和bottom,第二個表示left和right
因為0 auto,表示上下邊界為0,左右則根據寬度自適應相同值(即居中)

5.cursor: text

cursor 屬性規定所顯示的指標(游標)的型別。

6 . < label for=”u”>請輸入您的帳號< / label>

for 屬性規定 label 與哪個表單元素繫結。
< input id=”u” >

7.style=”background:0”是什麼意思啊

定義它為0也可以沖掉其他定義繼承的背景色不過不建議寫0
你把它改為background:none 標準寫法也可以達到效果

8.關於webContent下面url的理解

.inputOuter {
background: url(loginCss/icon_3.png)
no-repeat -1px -1px
}

上面是css樣式的編寫,專案層次是這樣的WebContent/Store/loginCss/icon_3.png)
login.jsp(在Store資料夾)裡面要去取icon_3.png(在Store/loginCss)這個圖片,有兩張寫法:

url = ./loginCss/icon_3.png
url = loginCss/icon_3.png

9.#id,.chass

html css樣式是從上到下覆蓋的,起作用的用於是最後被編譯的那個,即後一個覆蓋前一個。包括< style >< /style>後面如果有< link>,那麼< link >裡面的起作用

10.position: absolute;定義以後再加上left,top等定位屬性

/* lable */
.lable{
position: absolute;/* 重要屬性 */
top: 13px; +
left: 13px;
cursor: text
}

position: absolute被定義以後,再寫left,top此類定位屬性,造成的效果將會完全不一樣,該lable塊將為以螢幕左上角為參照點

.a .lable{
position: absolute;
top: 12px;
*top: 13px;
_top: 14px;
}

這種情況,lable將會以a為參考點
關於position的幾個屬性和子div與父div的愛恨糾纏,看了一篇文章寫的很詳細,夠簡潔
http://www.jb51.net/web/77495.html