ASP.NET編程規(guī)范之界面設(shè)計(jì)標(biāo)準(zhǔn)淺析
ASP.NET編程規(guī)范之界面設(shè)計(jì)標(biāo)準(zhǔn)都有哪些呢?那么我們首先來
ASP.NET編程規(guī)范之界面設(shè)計(jì)標(biāo)準(zhǔn)1.開發(fā)環(huán)境設(shè)置:
屏幕設(shè)置為800*600/1024*768
ASP.NET編程規(guī)范之界面設(shè)計(jì)標(biāo)準(zhǔn)2.界面設(shè)計(jì)原則:
風(fēng)格必須統(tǒng)一
ASP.NET編程規(guī)范之界面設(shè)計(jì)標(biāo)準(zhǔn)3.B/S結(jié)構(gòu)開發(fā)原則:
使用框架/模板
ASP.NET編程規(guī)范之界面設(shè)計(jì)標(biāo)準(zhǔn)4.頁面使用表格(Table)進(jìn)行格式設(shè)置。
最外面的表格設(shè)置:width=778px align=center border=0
ASP.NET編程規(guī)范之界面設(shè)計(jì)標(biāo)準(zhǔn)5.主頁面Body設(shè)置:
bgcolor="#cccccc"
ASP.NET編程規(guī)范之界面設(shè)計(jì)標(biāo)準(zhǔn)6.框架子頁面Body設(shè)置:
bottomMargin="0" leftMargin="0"
ASP.NET編程規(guī)范之界面設(shè)計(jì)標(biāo)準(zhǔn)7.對(duì)齊:
文字(標(biāo)簽)右對(duì)齊;數(shù)字(數(shù)據(jù))右對(duì)齊;文字(數(shù)據(jù))左對(duì)齊,比較短的可以居中對(duì)齊;金額,需加上 千位符
ASP.NET編程規(guī)范之界面設(shè)計(jì)標(biāo)準(zhǔn)8.冒號(hào)必須是在中文輸入狀態(tài)下鍵入
ASP.NET編程規(guī)范之界面設(shè)計(jì)標(biāo)準(zhǔn)9.控件使用原則:
盡可能使用Html控件,需要提交而又不用在客戶端使用Javasrcipt的可以使用Web控件
ASP.NET編程規(guī)范之界面設(shè)計(jì)標(biāo)準(zhǔn)10.
控件使用約定:
(1)控件外觀設(shè)置:style.css
i.i 鏈接類:
- a:link {font-size: 12px;line-height: 20px;text-decoration: none; color: #666666}
- a:visited {font-size: 12px;line-height: 20px;color: #666666;text-decoration:
- none;}
- a:hover {font-size: 12px;line-height: 20px;color: #FF6600;text-decoration:
- underline;}
- a:active {font-size: 12px;line-height: 20px;color: #666666;text-decoration:
- underline;}
i.ii 表格類:
td{font-size: 12px; line-height: 20px; text-decoration: none;}
i.iii 文本框類:
- .inputPM{BORDER-RIGHT: #99ccff 1px solid; BORDER-TOP: #99ccff 1px solid;
- BORDER-LEFT: #99ccff 1px solid; BORDER-BOTTOM: #99ccff 1px solid;
- HEIGHT: 22px}
i.iv datagrid類:
- .dg_grid /* Grid-總體 */
- {font-size:12px; border-style:solid; border-width:2px; border-color:White;
- text-align:center; vertical-align:middle;}
- .dg_header /* Grid-頁眉 */
- {font-weight :bold ; color:#E7E7FF; background-color :#3366CC; text-align:center;
- vertical-align:middle; height:25px;}
- .dg_alter /* Grid-交替行 */
- {background-color :AliceBlue; height:22px;}
- .dg_item /* Grid-普通行 */
- {color :Black; background-color:WhiteSmoke; height:22px;}
- .dg_page /* Grid-頁導(dǎo)航 */
- {color:Black; text-align:right; vertical-align:middle; height:22px;}
- .dg_select{font-weight :bold ; color:White; background-color :#9471DE;} /* Grid-選擇行 */
(2)幾點(diǎn)補(bǔ)充:
ii.i 控件datagrid的數(shù)據(jù)顯示:文字(短)居中對(duì)齊;文字(長(zhǎng))左對(duì)齊;日期左對(duì)齊;數(shù)字左對(duì)齊;金額左對(duì)齊,千位符
ii.ii 控件text的長(zhǎng)度MaxLength按數(shù)據(jù)結(jié)構(gòu)要求設(shè)置
ii.iii 因?yàn)椴僮髦饕鷶?shù)據(jù)庫相關(guān),所以控件類型可以與數(shù)據(jù)表字段(field)類型形成對(duì)應(yīng),此處約定為:
◆字段類型為文本、數(shù)字時(shí),控件使用文本框
◆字段類型為布爾值時(shí),控件使用單項(xiàng)選擇按鈕(checkbox控件)或下拉框
◆字段內(nèi)容在固定的幾個(gè)值中選擇時(shí)(不論其類型),控件使用下拉框
◆字段類型為日期時(shí)間時(shí),控件使用文本框+按鈕(按鈕可以選擇日期,按鈕.Value=”…”)
◆字段為其它表的外鍵,則分為兩種情況:
a)、如果是屬于基本資料的,控件使用下拉框。
b)、如果不是屬于基本資料的,控件使用文本框+按鈕(按鈕用于跳出查詢窗口,按說鈕.Value=”…”
◆數(shù)據(jù)操作窗口一般為DataGrid+錄入框
a)、DataGrid用于顯示數(shù)據(jù)
b)、錄入框用于輸入/顯示數(shù)據(jù)
c)、瀏覽窗口基本樣式,主要以表格形式顯示紀(jì)錄,單表控件使用DataGrid/DataList/Repeater,多表使用NestedDataGrid
ASP.NET編程規(guī)范之界面設(shè)計(jì)標(biāo)準(zhǔn)就向你介紹到這里,希望你對(duì)ASP.NET編程規(guī)范之界面設(shè)計(jì)標(biāo)準(zhǔn)有所了解。
【編輯推薦】