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
620
浅谈表单元素
详细介绍了表单元素的制作
w3cplus
December 12, 2012
Tweet
Share
More Decks by w3cplus
See All by w3cplus
手淘互动动效探索
w3cplus
0
210
CSS Future
w3cplus
2
610
Web Animation
w3cplus
5
470
CSS3带来的变化
w3cplus
0
1.4k
Web重构之道
w3cplus
1
2.7k
Sass带来的变革
w3cplus
2
570
Responsive小试牛刀
w3cplus
3
540
CSS预处器——Sass、LESS和Stylus实践
w3cplus
0
370
http协议与缓存简述
w3cplus
5
510
Other Decks in Technology
See All in Technology
生成AIによる情報システムへのインパクト
taka_aki
1
150
AIコードアシスタントとiOS開発
jollyjoester
1
230
手動からの解放!!Strands Agents で実現する総合テスト自動化
ideaws
2
310
公開初日に個人環境で試した Gemini CLI 体験記など / Gemini CLI実験レポート
you
PRO
3
350
そもそも AWS FIS について。なぜ今 FIS のハンズオンなのか?などなど
kazzpapa3
2
120
増え続ける脆弱性に立ち向かう: 事前対策と優先度づけによる 持続可能な脆弱性管理 / Confronting the Rise of Vulnerabilities: Sustainable Management Through Proactive Measures and Prioritization
nttcom
1
180
MCPに潜むセキュリティリスクを考えてみる
milix_m
1
740
スプリントレビューを効果的にするために
miholovesq
9
1.6k
P2P ではじめる WebRTC のつまづきどころ
tnoho
1
220
claude codeでPrompt Engineering
iori0311
0
450
Turn Your Community into a Fundraising Catalyst for Black Philanthropy Month
auctria
PRO
0
140
地図と生成AI
nakasho
0
710
Featured
See All Featured
Practical Orchestrator
shlominoach
189
11k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.4k
Building Better People: How to give real-time feedback that sticks.
wjessup
367
19k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
26
2.9k
What's in a price? How to price your products and services
michaelherold
246
12k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
161
15k
Designing for humans not robots
tammielis
253
25k
Build your cross-platform service in a week with App Engine
jlugia
231
18k
How GitHub (no longer) Works
holman
314
140k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
50
5.5k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
45
7.5k
Keith and Marios Guide to Fast Websites
keithpitt
411
22k
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