input type="datetime-local" 时placeholder不显示
一个坑,input的type="datetime-local" 时,电脑上会显示提示,如图
<input type="datetime-local" name="user_date" placeholder="请选择时间" />

但是,手机上不会显示,就是一片白,加上placeholder也是白费。
添上这段代码,亲测ios可以正常提示提示信息,安卓还是一片白。
input[type="datetime-local"]:before{
content: '填写预约时间';
color: #a9a9a9;
text-align: left;
width:100%;
}
input[type="datetime-local"]:active:before, input[type="datetime-local"]:hover:before, input[type="datetime-local"]:visited:before, input[type="datetime-local"]:focus:before{
content: '';
width: 100%;
}
如果提示信息不是垂直居中,要设置input的高度和行高。
input type="datetime-local" 时placeholder不显示的更多相关文章
- <input type="file" />浏览时只显示指定文件类型
<input type="file" />浏览时只显示指定文件类型 <input type="file" accept="appli ...
- 手机端input[type=date]的时候placeholder不起作用解决方案
目前PC端对input 的date类型支持不好,我试下来的结果是只有chrome支持.firefox.IE11 都不支持.而且PC端有很多日历控件可供使用.就不去多考虑这点了. 那么在移动端的话,io ...
- jquery 处理密码输入框(input type="password" ) 模仿placeholder
html <form method="post" action=""> <ul> <li> <span>邮箱&l ...
- html中去掉文本框(input type="text")的边框或只显示下边框
去掉: <input type="text" name="textfield" style="border:0px;"&g ...
- input type 为 number 时去掉上下小箭头
<input type="number" ...> <style> input::-webkit-outer-spin-button, input::-we ...
- 小程序input组件获得焦点时placeholder内容有重影
这个问题是小程序input组件的bug,目前的解决办法可以,在input标签上加一个其他标签,显示placeholder内容,获得焦点时消失,失去焦点时候再让其显示 <view class='i ...
- H5新特性 input type=date 在手机上默认提示显示无效解决办法
目前PC端对input 的date类型支持不好,我试下来的结果是只有chrome支持.firefox.IE11 都不支持.而且PC端有很多日历控件可供使用.就不去多考虑这点了. 那么在移动端的话,io ...
- 解决input[type=file]打开时慢、卡顿问题
经过测试发现,在mac里面safari.Firefox.Chrome(opera不知道为啥老闪退)都没有卡顿问题 在windows里面,Firefox不卡顿,只有Chrome卡顿. 然而,这个插件是从 ...
- 输入类型<input type="number"> / input标签的输入限制
输入限制 属性 描述 disabled 规定输入字段应该被禁用. max 规定输入字段的最大值. maxlength 规定输入字段的最大字符数. min 规定输入字段的最小值. pattern 规定通 ...
随机推荐
- Ext JS 如何动态加载JavaScript创建窗体
JavaScript不需要编译即可运行,这让JavaScript构建的应用程序可以变得很灵活.我们可以根据需要动态从服务器加载JavaScript脚本来创建和控制UI来与用户交互.下面结合Ext JS ...
- Android开发学习—— 下载网络图片
现在几乎所有的应用都在使用网络来达到浏览的目的.对于特定领域 使用xnpp协议 像即时通讯软件.但大多数还是使用HTTP协议来交互. 网络图片查看器 HTTP协议 下载网络 图片 <Relati ...
- Extjs5 tabs实例
<%@ page language= "java" contentType ="text/html; charset=UTF-8" pageEnc ...
- seL4之hello-3征途
seL4之hello-3征途 回顾上周 了解seL4的启动流程和初始化线程 了解seL4的几种内核对象和权能机制 完成hell0-2的运行. 补充上周 1.找到根任务(初始化线程)的创建具体的位置(那 ...
- PHP中的数据库四、mongodb
h2:first-child, body>h1:first-child, body>h1:first-child+h2, body>h3:first-child, body>h ...
- mysql主备(centos6.4)
服务器基本环境: 两台centos6.4.iptables diabled .selinux disabled 两台的hosts解析 #yum install mysql -y //这个一定要装 ...
- MVC中在RAZOR 模板里突然了现了 CANNOT RESOLVE SYMBOL ‘VIEWBAG’ 的错误提示
然后在Razor中出现了@ViewBag的不可用,@Url不可用,@Html 这些变量都不能用了. 异常提示: 编译器错误消息: CS0426: 类型“XX.Model.System”中不存在类型名称 ...
- javascript判断是否为闰年
//判断年份year是否为闰年,是闰年则返回true,否则返回false function isLeapYear(year){ var a = year % 4; var b = year % 100 ...
- [django]django 在apache2上部署静态文件如何加载
首先找到apache2的conf文件下的httpd.conf,添加如下信息: Alias /static/ E:/wamp/Apache24/www/static/ <Directory E:/ ...
- java 多线程 Synchronized方法和方法块 synchronized(this)和synchronized(object)的理解
synchronized 关键字,它包括两种用法:synchronized 方法和 synchronized 块. 1. synchronized 方法:通过在方法声明中加入 synchronized ...