html代碼集
font【文字】
font-size:1px 文字大小
color:red 文字顏色
font-family:「字體」 文字字體
font-weight:bold 文字加粗
font-style:italic 文字傾斜
text【文本】
text-align:left/center/right 居中對齊/左右對齊
text-align:justity 兩端對齊
text-decoration:overline 上劃線
text-decoration:line-through 中劃線
text-decoration:underline 下劃線
text-indent:1px/10% 首行縮進
text-shadow:(x y size color) 文字陰影
line-height:1px/10% 行高
word-spacing:1px/10% 字間距
vertical-align:sub 垂直方向對齊下標
vertical-align:sup 垂直方向對齊上標
vertical-align:top 垂直方向對齊最高元素
vertical-align:bottom 垂直方向對齊最低元素
vertical-align:text-top 垂直方向對齊與副高對齊
vertical-align:middle 垂直方向對齊放在父元素中部
border【邊框】
border-width:1px; 邊框寬度
border-color:red; 邊框顏色
border-style:solid; 實線
border-style:bouble; 雙線
border-style:dashed; 虛線
border-style:botted; 點狀
border-radius:50% 圓角
outline-width/color/style 外邊框,不佔據空間
box【盒子】
box-sizing:content-box 內容盒子
box-sizing:border-box 邊框盒子
box-shadow:(x y size color) 盒子陰影
img【圖片】
src="路徑"
alt="圖片說明文字"
tittle="鼠標懸停時提示文字"
a【超連接】
href:"路徑"
title="鼠標懸停時提示文字"
target="_blank" 在新窗口打開
background【背景】
background-image:url(); 插入背景圖片
background-repeat:no-repeat 顯示一張圖
background-repeat:repeat-x 橫向平鋪
background-repeat:repeat-y 縱向平鋪
background-position:x,y 橫縱座標定位
background-position:top/center/bottom/left/right 上中下/左中右
background-attachment:scroll; 默認滾動
background-attachment:fixed 固定
from【表單】
1.屬性
name 屬性: 規定表單的名稱,name屬性提供了一種在腳本中引用表單的方法
action屬性: 規定當提交表單時,向何處發送表單數據。
method屬性: 規定如何發送表單數據(表單數據發送到 action 屬性所規定的頁面)
2.文本框
<input type="text">
value: 設定值
placeholder: 定義框內提示文字
maxlength: 最大字符
size: 字段寬度
3.密碼框
<input type="password">
value"按鈕內容"> 設定值
placeholder 定義框內提示文字
4.提交按鈕
<input type="submit">
5.按鈕
<input type="button">
6.重置按鈕
<input type="reset" >
7.文本域
<input type="textarea">
cols: 規定文本區域內可見的寬度
rows: 規定文本區域內可見的行數
position【定位】
position:relative 相對定位,不脫離文檔流,最佳包含塊
position:absolute 絕對定位,脫離文檔流,
position:fixed 固定定位,脫離文檔流
position:sticky 粘性定位
z-index:1 層疊序列
overflow【溢出顯示】
overflow:visibile 默認溢出顯示
overflow:hodden 溢出隱藏
overflow:scroll 老是顯示滾動條
overflow:auto 若移除則顯示滾動條
transform:translate(x,y) 2D旋轉
transform:translate(x,y,z) 3D旋轉