<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>表單元素完美垂直居中</title>
<style type="text/css">
*{padding:0; margin:0;}
body{font:14px/1.231 Tahoma, Geneva, sans-serif; background-color:#D1D5E7;}
label{cursor:pointer; vertical-align:middle;}
input{vertical-align:middle; margin:5px;}
.warp{ margin:100px 350px;}
span{ vertical-align:middle; text-decoration:underline;}
img{ vertical-align:middle; border:1px solid #CCF;_margin-bottom:1px;}
p{font-size:14px;}
h2{font-size:16px;}
</style>
</head>
<body>
<div class="warp">
<h2>單選框和復選框面積很小,不容易點擊,造成許多用戶的困擾,用戶體驗不佳</h2>
<p>請看【一絲冰涼】的完美解決方案:
完美垂直居中,點擊文字可選,快捷鍵可選,鼠標在文字上顯示手型(暗示可點擊)</p>
<input name="aaa" id="aaa" type="checkbox" value=""/> <label for="aaa">X×我是完美的復選框</label>
<input name="ccc" id="ccc" type="checkbox" accesskey="2" value=""/> <label for="ccc">我支持鍵盤 Alt+2選擇(<span>2</span>)</label>
<input name="bbb" id="bbb" type="radio" value=""/><label for="bbb">X×我是完美的單選框</label>
<label for="fff">X×我是完美的文本框</label><input id="fff" type="text"/>
<input name="eee" id="eee" type="checkbox" value=""/><span>圖片也能居中</span><img width="270" height="129" usemap="#mp" src="http://www.baidu.com/img/baidu_sylogo1.gif"/>
</div>