text文本、password密碼、dadio單選框、checkbox複選框、submit提交、reset重置、button按鈕、file上傳、hidden隱藏html
默認選中checked <input type="radio" name="sex" value="men" checked="checked"/>男
html5
禁用元素disabled <input type="text"name="user_name" value="輸入框" id="q" disabled="disabled"/>
瀏覽器
<form action="轉到的連接">
<p>
<lable for="q">用戶名:</lable>
<input type="text"name="user_name" value="輸入框" id="q" disabled="disabled"/>
</p>
<p>
<lable for="w">密碼:</lable>
<input type="password" name="password" value="" id="w"/>
</p>
<p>
<lable for="">性別:</lable>
<input type="radio" name="sex" value="men" checked="checked"/>男
<input type="radio" name="sex" value="women"/>女
</p>
<p>
<lable for="">興趣:</lable>
<input type="checkbox" name="xingqu" value="chi" />吃
<input type="checkbox" name="xingqu" value="he"/>喝
</p>
<input type="submit" value="提交按鈕文字"/>
<input type="reset" value="重置按鈕文字"/>
<input type="button" value="自定義按鈕"/>
<input type="file"/>
<input type="hidden" value="yicang"/>
</form>
複製代碼
<select>
<option>1</option>
<option>2</option>
<option>3</option>
</select>
複製代碼
<style>
textarea{
width: 400px;
height:300px;
}
</style>
<body>
<textarea></textarea>
</body>
複製代碼
<script src="js/html5shiv.js"></script>
bash
浮動兼容性用浮動解決ui
不要讓子元素的寬高超過父級spa
h、p、td 不能嵌套塊元素標籤插件
display: inline-block; IE兼容解決方案:code
加上:
*display:inline; *zoom: 1;orm
CSS Hack:針對不一樣的瀏覽器寫不一樣的CSS樣式的過程htm
JS插件(問題:不能處理body上的png24)
<script src="js/DD_belatedPNG_0.0.8a.js"></script>
<style>
DD_belatedPNG.fix("目標元素");
</style>
複製代碼
原生濾鏡
<body>
background: none;
filter:progid:DXImageTransform.Microsoft.AlphaImageLoadere(src="XX.png",sizingMethod="crop");
</body>
複製代碼
樣式優先級
默認<類型<class<id<style(行間)<!important