zoukankan      html  css  js  c++  java
  • 表单元素完美垂直居中

    <!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>请看【一丝冰凉】的完美解决方案:<br />
    完美垂直居中,点击文字可选,快捷键可选,鼠标在文字上显示手型(暗示可点击)</p>
    <input name="aaa" id="aaa" type="checkbox" value=""/> <label for="aaa">X×我是完美的复选框</label> <br />
    <input name="ccc" id="ccc" type="checkbox" accesskey="2" value=""/> <label for="ccc">我支持键盘 Alt+2选择(<span>2</span>)</label> <br />
    <input name="bbb" id="bbb" type="radio" value=""/><label for="bbb">X×我是完美的单选框</label><br />
    <label for="fff">X×我是完美的文本框</label><input id="fff" type="text"/><br />
    <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>
    </body>
    </html>
  • 相关阅读:
    苏教版国标本小学语文第一册汉字笔画
    C++ preprocessor __VA_ARGS__ number of arguments
    The Aggregate Magic Algorithms
    USB Mass Storage大容量存储的基本知识
    【转】驱动和应用层的三种通信方式
    Do You Actually Know What *P++ Does In C?
    Repeat Macro Cloak
    A SCSI command code quick reference
    USB device layout, descriptors, interface alternate setting
    RTOS Semaphore Services
  • 原文地址:https://www.cnblogs.com/lhgstudio/p/2243846.html
Copyright © 2011-2022 走看看