黑松山资源网 Design By www.paidiu.com
1. 去掉input 在iOS中的默认圆角和内阴影
iOS下 input会有自带的圆角和内阴影,去掉方法如下:
input{ -webkit-appearance: none; border-radius: 0; }
2. 焦点在 input 时,placeholder 没有隐藏
input:focus::-webkit-input-placeholder{ opacity: 0; }
3. input 输入框调出数字键盘
单独使用type="number"时,iOS调起的并不是九宫格样式的数字键盘,如果需要调起九宫格的数字键盘需要加上 pattern="[0-9]*" 属性
<!-- 数字键盘 带有符号,非九宫格样式 --> <input type="number"/> <!-- 九宫格数字键盘 --> <input type="number" pattern="[0-9]*"/> <!-- 电话号码键盘 --> <input type="tel"/>
4. 搜索时,键盘的回车按钮文字设定为“搜索”
解决: input 使用 type="search",放在 form 表单内。两者结合就能使输入法中的回车按钮文字变为“搜索”
<form action=""> <input type="search" /> </form>
5. 改变input placeholder颜色
::-webkit-input-placeholder { /* WebKit browsers */ color: #999; } :-moz-placeholder { /* Mozilla Firefox 4 to 18 */ color: #999; opacity: 1; } ::-moz-placeholder { /* Mozilla Firefox 19+ */ color: #999; opacity: 1; } :-ms-input-placeholder { /* Internet Explorer 10+ */ color: #999; } input::-webkit-input-placeholder, textarea::-webkit-input-placeholder { /* WebKit*/ color: #666; } input:-moz-placeholder, textarea:-moz-placeholder { /* Mozilla Firefox 4 to 18 */ color: #666; } input::-moz-placeholder, textarea::-moz-placeholder { /* Mozilla Firefox 19+ */ color: #666; } input:-ms-input-placeholder, textarea:-ms-input-placeholder { /* IE 10+ */ color: #666; }
6. iOS下autofocus focus()失效的问题
iOS下不能自动获取焦点,必须是在监听到用户发出的事件的函数中执行focus才有用,比如:
// openNotifyReplay 是click触发的事件 openNotifyReplay = (e) => { this.setState({ notifyReplayVisible: true }, ()=>{ document.getElementById("replayPopupText").focus() }) }
黑松山资源网 Design By www.paidiu.com
广告合作:本站广告合作请联系QQ:858582 申请时备注:广告合作(否则不回)
免责声明:本站资源来自互联网收集,仅供用于学习和交流,请遵循相关法律法规,本站一切资源不代表本站立场,如有侵权、后门、不妥请联系本站删除!
免责声明:本站资源来自互联网收集,仅供用于学习和交流,请遵循相关法律法规,本站一切资源不代表本站立场,如有侵权、后门、不妥请联系本站删除!
黑松山资源网 Design By www.paidiu.com
暂无评论...
更新日志
2024年09月20日
2024年09月20日
- 《腾格尔 容中尔甲 亚东 高原三星 男人篇 3CD》[WAV/分轨][1GB]
- 命运圣契公测实测可用兑换码大全 命运圣契最新兑换码分享
- 黑神话悟空上品疾蝠精魄获取方法一览|上品疾蝠精魄收集攻略
- 《七龙珠电光炸裂!ZERO》GT角色预告片曝光,15位新角色登场
- [ABC]安娜-胆麦发烧女声[6N纯银镀膜][2016[低速原抓WAV+CUE]
- NewViennaOctetViennaWindSoloists-TheDeccaRecordings(2024)18CD[24-48][FLAC]-7
- 雨果唱片-三角琴《俄罗斯民间音乐系列-梁祝(中国名曲)》wav
- 《塞尔达传说:智慧的再现》新实机!无之世界介绍
- 任天堂公布《塞尔达传说》系列时间线:野炊与王泪独立在外
- 任天堂更新网络投稿规范:打击影响他人游戏体验行为
- 冼佩瑾.2024-女儿Daughter(EP)【杰威尔】【FLAC分轨】
- 黑豹乐队.1993-光芒之神【摇音晨【WAV+CUE】
- 曾轶可.2011-一只猫的旅行【天娱传媒】【WAV+CUE】
- 黑神话悟空上品狼刺客精魄获取方法一览|上品狼刺客精魄收集攻略
- 视觉小说《神椿市建设中REGENERATE》将于2025年2月20日发售