美化表单

<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8"/>
    <meta content="width=device-width,minimum-scale=1.0,maximum-scale=1.0" name="viewport" />
    <meta name=‘apple-mobile-web-app-capable‘ content=‘yes‘ />
    <meta name="format-detection" content="telephone=no" />
    <title></title>
    <style>
        body,div,span,i,strong,ul,li,a,p,b,textarea{ margin:0; padding:0; border:0;
            font-family:"Microsoft Yahei","微软雅黑",Tahoma,Arial,Helvetica,STHeiti;
            -webkit-tap-highlight-color:rgba(0,0,0,0); word-wrap:break-word; word-break: break-all;
            font-size: 14px; font-weight:normal; -webkit-text-size-adjust:none;
            color: #494949; font-style: normal; }
        html,body{ height: 100%; }
        input,textarea{-webkit-appearance:none; margin: 0; padding: 0; outline: none; border: none; }
        ul,ol{ list-style: none; }
        img{ vertical-align: top; }
        .box{ min-height: 100%; padding:15px 20px;}
        .p-title{ color: #494949; font-size: 1em; line-height: 150%}
        .p-title strong{ color: #ff8a00}
        .main{ padding: 110px 0 10px 0; background: #fff8ed url(images/mao1.png) no-repeat center 10px;
        background-size: 200px auto;}
        .form-list{ width:80%; margin: 0 auto;}
        .form-list li{ line-height: 18px; padding: 5px 0 }
        .form-list i{ display: inline-block; width:37%; height: 26px; line-height: 26px; text-align: left}
        .ares{width:100%; padding: 5px; border: 1px solid #ccc; height: 90px; overflow-x: hidden;
            overflow-y: auto; outline: none; -webkit-box-sizing: border-box;-moz-box-sizing: border-box;
        box-sizing: border-box;}
    .input-box{width:60%; height: 20px; line-height: 20px; padding: 2px; border: 1px solid #ccc;
        background:#fff;float: right}
        .input{ width:100%; height: 20px; line-height: 20px; }

.btn{ display: block; height: 45px; width:40%; font-size:1.25em; background: #f99d00; border-radius: 4px; color: #fff;
           margin: 10px auto; text-align: center; line-height: 45px;  text-decoration: none;
       }
        .btn:hover{ background:#dc8b02 }

/*input[type=checkbox]{ width:18px; height:18px; background:rgba(231,231,231,.78);*/
            /*border-radius:2px; box-shadow:inset 0 1px 7px rgba(0,0,0,.12);*/
            /*position:relative; border:0; vertical-align: top; }*/
        /*label input[type=checkbox]:checked:before,*/
        /*label input[type=checkbox]:checked:after{ content:‘‘; display:block;*/
            /*background:rgba(182,184,181,1); position:absolute;*/
            /*-webkit-transform:rotate(38deg); -moz-transform:rotate(38deg);*/
            /*transform:rotate(38deg); border-radius:1px; }*/
        /*label input[type=checkbox]:checked:before{ width:6px; height:3px; left:3px; top:9px; }*/
        /*label input[type=checkbox]:checked:after{ width:3px; height:12px; left:10px; top:3px; }*/

input[type=checkbox]{width:18px; height: 18px; background: #fff; border-radius: 2px;
         box-shadow: inset 0 1px 7px #ccc; position: relative; border: 1px solid #666;
            vertical-align: top;
        }
        label input[type=checkbox]:checked:before,
        label input[type=checkbox]:checked:after{content: ‘‘; display: block;
            background: #ff00ff; position: absolute;-webkit-transform:rotate(38deg);
        -moz-transform:rotate(38deg); transform:rotate(38deg); border-radius:1px;}
        label input[type=checkbox]:checked:before{width:6px; height: 3px; left:3px; top:9px;}
        label input[type=checkbox]:checked:after{width:3px; height: 12px; left:10px; top:3px;}

</style>

</head>
<body>
<div class="box">
    <p class="p-title">
        亲爱的用户:<br>
        很抱歉看到您退订<strong>泡泡消息</strong>。假如我们哪里做得不好,请您批评指正。
    </p>
    <div class="main">
        <ul class="form-list">
            <li><label for="labfoa"><input type="checkbox" name="labfoa" id="labfoa"/>&nbsp;&nbsp; 我收到的泡泡消息都没价值</label></li>
            <li><label for="labfob"><input type="checkbox" name="labfoa" id="labfob"/>&nbsp;&nbsp; 泡泡太多很讨厌</label></li>
            <li><label for="labfoc"><input type="checkbox" name="labfoa" id="labfoc"/>&nbsp;&nbsp; 其他原因</label></li>
            <li><textarea placeholder="请输入关键字" class="ares"></textarea></li>
            <li><i>QQ联系方式</i><span class="input-box"><input type="text" class="input"/></span></li>
        </ul>
    </div>
    <a href="javascript:" class="btn">确认订单</a>

</div>
</body>
</html>

时间: 2024-08-30 01:58:21

美化表单的相关文章

CSS3美化表单控件

CSS3美化表单控件 2016-06-28 18:14 by 图书馆的牧羊人, 582 阅读, 9 评论, 收藏,  编辑 表单的默认控件在不同的浏览器中的样式不同,用户体验很差.用CSS3可以实现表单控件的美化,可以提供更好的用户体验.不足之处就是浏览器的兼容性问题. 一.下拉控件 效果图: 下拉控件的布局结构: <div class="container"> <div class="select"> <p>所有选项</p

css3属性:美化表单、点击元素产生的背景与边框怎么去掉,滚动回弹效果

表单元素之选择系

选择系特指input[type=radio]与input[type=checkbox], 俗话的单选框与复选框.它们都是 通过checked属性决定是否能提交到后端,在传统框架中,都是将它们序列化成字符串进行提交,但新的MVVM框架, 它们对应的是更语义化的东西.单选框为一个布尔,那么只要将它的name值及选中或选中的布尔(通常为节省字符简化为0或1)提交就行.在复选框 对应一个字符串数组,将数组序列化进行提交. 从上面的描述来看,关键在于checked属性的监听.通常来说,属性变动用chang

AngularJS开发指南6:AngularJS表单详解

表单控件(input, select, textarea )是用来获取用户输入的.表单则是一组有联系的表单控件的集合. 用户能通过表单和表单控件提供验证的服务,知道自己的输入是否合法.这样能让用户交互变得友好,因为用户能通过反馈来修正自己的错误.不过,虽然客户端的验证能够起到很大作用,但也很容易被绕过,所以不能完全依靠客户端验证. 要建立安全的应用,服务器端验证还是必不可少的. 了解AngularJS双向绑定的关键在于了解ngModel指令.这个指令通过动态将model和view互相映射,来实现

自定义表单样式之checkbox和radio

1,起因 最近在工作中要实现自定义式的radio样式,而我们通常使用的时默认的样式,因为自己实在想不到解决的方法,于是开始搜索,最终看到了不错的解决办法,可以完美解决我们遇到的问题. 2,原理 大家都知道在写结构的时候,radio或checkbox都会跟随label一起使用,label的for属性值和input的id值相同的情况下,点击label就可以选中input,这里正是利用label 来覆盖我们的input默认样式,通过给label添加背景图片(美化的checkbox或radio),也就是

jqTransform:呈现更美的表单

jqTransform,是DFC Engineering写的一个jQuery的样式插件,用于美化表单元素,使用方便简单,能美化所有表单元素包括input,radio,textarea,select,checkbox. 使用方法: 1.添加javascript引用和css文件的引用 <link rel="stylesheet" type="text/css" href="jqtransform.css" /> <script ty

【Flask】 WTForm表单编程

WTForm表单编程 在网页中,为了和用户进行信息交互总是不得不出现一些表单.flask设计了WTForm表单库来使flask可以更加简便地管理操作表单数据.WTForm中最重要的几个概念如下: Form类,开发者自定义的表单必须继承自Form类或者其子类.Form类最主要的功能是通过其所包含的Field类提供对表单内数据的快捷访问方式. 各种Field类,即字段.一般而言每个Field类都对应一个input的HTML标签.比如WTForm自带的一些Field类比如BooleanField就对应

Angular2.js——表单(上)

表单创建一个有效.引人注目的数据输入体验.Angular表单协调一组数据绑定控件,跟踪变更.验证输入的有效性,并且显示错误信息. 接下来,主要内容有: 1.使用组件和模板构建Angular表单: 2.用ngModel创建数据绑定,以读取和写入输入控件的值. 构建Angular表单 我们想构建包含姓名,电话,特长三个字段的表单 1.我们可以参照快速启动那篇,创建一个名为forms的新项目,也可以使用之前的项目进行修改: 2.创建Person类: 3.创建控制此表单的组件: 4.创建具有初始表单布局

angular2-模板驱动表单

app.module.ts 导入 FormsModule  import { NgModule } from '@angular/core'; import { BrowserModule } from '@angular/platform-browser'; import { FormsModule } from '@angular/forms'; import { AppComponent } from './app.component'; import { HeroFormComponen