表格和表单
表格:
在設計里,創建表格,選擇幾行幾列,表格寬度有百分比和像素
圖片是由像素組成
像素越多,圖片越清晰,圖片的文件就越大
基本結構:
<table> --表格開始,表格里只能放行
<tr> --行里只能放列
<td>萬物</td> --列/單元格
</tr>
</table>
table的屬性:
cellpadding:內容與單元格邊框的距離,內部距離
cellspacing:單元格之間的距離,外部距離
width:寬度
border:邊框
align:水平對齊方法(align right 向右對齊)
tr的屬性
valign 垂直對齊的方法
height:行高
table、tr和td里都有:
align:水平對齊方法
bgcolor:背景顏色
backgroung:背景圖片
三個重點
一、幾行幾列(幾行,每一行有幾個單元格)
二、寬度和高度
三、邊框
表單:
表單元素一般就寫在<form>表單標記中間,一個頁面只能有一個form表單
在head里打入<style type="text/css">
id里的內容
</style>
一、文本輸入
文本框 - <input type="text">
密碼框 - <input type = "password">
文本域 - <textarea></textarea>
隱藏域 - <input type="hidden">
二、按鈕
提交按鈕 - <input type="submit">
重置按鈕 - <input type="reset">
普通按鈕 - <input type="button">
圖片按鈕 - <input type="image">
disabled = "disabled" - 是否可用
value - 按鈕顯示文字
三、選擇輸入
單選按鈕 - <input type="radio">
復選按鈕 - <input type = "checkbox">
name - 分組
checked = "checked" - 默認選中
<label for="指向id"> - 將焦點定位到for指向的id元素上去
文件上傳 - <input type = "file">
下拉列表框:
<select multiple="multiple"> - 是否顯示多項
<option>項1</option>
<option>項2</option>
......
</select>
option 中有 selected 屬性,設置selected ="selected",就是默認選中項
?
轉載于:https://www.cnblogs.com/sunshuping/p/5595876.html
總結
- 上一篇: ASP.NET内部原理(HttpHand
- 下一篇: Android Spinner值不显示,