Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
浅谈表单元素
Search
w3cplus
December 12, 2012
Technology
3
630
浅谈表单元素
详细介绍了表单元素的制作
w3cplus
December 12, 2012
Tweet
Share
More Decks by w3cplus
See All by w3cplus
手淘互动动效探索
w3cplus
0
240
CSS Future
w3cplus
2
640
Web Animation
w3cplus
5
500
CSS3带来的变化
w3cplus
0
1.5k
Web重构之道
w3cplus
1
2.8k
Sass带来的变革
w3cplus
2
620
Responsive小试牛刀
w3cplus
3
560
CSS预处器——Sass、LESS和Stylus实践
w3cplus
0
390
http协议与缓存简述
w3cplus
5
540
Other Decks in Technology
See All in Technology
自動テストが巻き起こした開発プロセス・チームの変化 / Impact of Automated Testing on Development Cycles and Team Dynamics
codmoninc
1
960
Contract One Engineering Unit 紹介資料
sansan33
PRO
0
14k
Introduction to Sansan for Engineers / エンジニア向け会社紹介
sansan33
PRO
6
71k
オンプレとGoogle Cloudを安全に繋ぐための、セキュア通信の勘所
waiwai2111
3
1.1k
Kaggleの経験が実務にどう活きているか / kaggle_findy
sansan_randd
1
320
チームメンバー迷わないIaC設計
hayama17
5
3.7k
Oracle Cloud Infrastructure:2026年2月度サービス・アップデート
oracle4engineer
PRO
0
200
マイグレーションガイドに書いてないRiverpod 3移行話
taiju59
0
350
AI Coding Agentの地殻変動 ~ ai-coding.info の定点観測 ~
kotauchisunsun
1
510
Digitization部 紹介資料
sansan33
PRO
1
7k
Agentic Codingの実践とチームで導入するための工夫
lycorptech_jp
PRO
0
390
「使いにくい」も「運用疲れ」も卒業する UIデザイナーとエンジニアが創る持続可能な内製開発
nrinetcom
PRO
1
770
Featured
See All Featured
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.4k
Avoiding the “Bad Training, Faster” Trap in the Age of AI
tmiket
0
96
Building Adaptive Systems
keathley
44
2.9k
Jess Joyce - The Pitfalls of Following Frameworks
techseoconnect
PRO
1
93
Designing for humans not robots
tammielis
254
26k
Beyond borders and beyond the search box: How to win the global "messy middle" with AI-driven SEO
davidcarrasco
3
65
Measuring & Analyzing Core Web Vitals
bluesmoon
9
770
AI Search: Where Are We & What Can We Do About It?
aleyda
0
7.1k
Data-driven link building: lessons from a $708K investment (BrightonSEO talk)
szymonslowik
1
950
Navigating Team Friction
lara
192
16k
A designer walks into a library…
pauljervisheath
210
24k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
133
19k
Transcript
浅谈表单元素 作者:为之,前端工程师 官网:http://www.w3cplus.com 微博:http://weibo.com/w3cplus
提纲 部分表单元素的一些简单分析 平时表单的需求分析 form.css实战 表单元素的美化
1、部分表单元素的一些简单分析 �radio & checkbox �submit 等btn 参考资料: input 按钮在IE下兼容问题 表单button的行高问题
如何移除button在IE67下的黑边 修复iPhone上submit按钮bug form radio & checkbox解决方案 submit提交按钮解决方案
1、部分表单元素的一些简单分析 参考资料: select的最佳预设 IE下 z-index 的各种坑 最佳预设 ie6层级问题 �select
1、部分表单元素的一些简单分析 参考资料: Styling the HTML5 placeholder HTML5, Placeholder, line-height in
Webkit Making HTML5 input placeholder text behave in Safari normalize.css WebKit HTML5 Search Inputs safari bug 定义样式 �placeholder �type="search"
2、表单元素需求分析 �水平label �垂直label �水平radio & checkbox �垂直radio & checkbox
2、表单元素需求分析 �提示文字 �提示文字用placeholder来搞定 �报错信息 或 在右侧显示span 单行显示,在表单顶部或底部p
2、表单元素需求分析 �一个label多个表单元素 �label加文字 �多个label多个元素
3、form.css 好了,是时候跟那些变态的需求说bye bye了 form.css 简单来说,form.css能帮助你快速完成上述的各种变态需求 当然看起来结构有点臃肿,但是到目前为止,所有的结构标 签都是必须的,真的没有多余可说,所以它能够面临上述所 有的各种变化需求。 参考资料: form解决方案
3、form.css css之所以能有用,当然得取决于一定结构的html 参考资料: form表单结构 .form-horizontal, .form-vertical .form-item, .form-radio-checkbox-wrap, .item-no-label, .form-action,
.inline-form-item .form-field .form-text, .form-radio, .form-checkbox, .code-pic, .inputbtn select,textarea .field-list-block, .inline-ele .form-error, .form-alert, .form-notice, .form-success, .form-info .fele
3、form.css �文本框 �textarea NO file �radio & checkbox
3、form.css �验证码 �条款,自动登录 NO file �select �submit
参考资料: 美化表单——自定义单选按钮和复选按钮 美化表单——自定义checkbox和radio样式 自定义表单——美化你的文件载入框 使用CSS3的appearance属性改变元素的外观 4、表单元素美化
4、谢谢 建议或疑问 email:['xuyc_brother','foxmail.com'].join('@') qq:'623089826'.replace(/8/g,'5') http://www.w3cplus.com