一个坑,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不显示的更多相关文章

  1. <input type="file" />浏览时只显示指定文件类型

    <input type="file" />浏览时只显示指定文件类型 <input type="file" accept="appli ...

  2. 手机端input[type=date]的时候placeholder不起作用解决方案

    目前PC端对input 的date类型支持不好,我试下来的结果是只有chrome支持.firefox.IE11 都不支持.而且PC端有很多日历控件可供使用.就不去多考虑这点了. 那么在移动端的话,io ...

  3. jquery 处理密码输入框(input type="password" ) 模仿placeholder

    html <form method="post" action=""> <ul> <li> <span>邮箱&l ...

  4. html中去掉文本框(input type="text")的边框或只显示下边框

    去掉: <input   type="text"   name="textfield"   style="border:0px;"&g ...

  5. input type 为 number 时去掉上下小箭头

    <input type="number" ...> <style> input::-webkit-outer-spin-button, input::-we ...

  6. 小程序input组件获得焦点时placeholder内容有重影

    这个问题是小程序input组件的bug,目前的解决办法可以,在input标签上加一个其他标签,显示placeholder内容,获得焦点时消失,失去焦点时候再让其显示 <view class='i ...

  7. H5新特性 input type=date 在手机上默认提示显示无效解决办法

    目前PC端对input 的date类型支持不好,我试下来的结果是只有chrome支持.firefox.IE11 都不支持.而且PC端有很多日历控件可供使用.就不去多考虑这点了. 那么在移动端的话,io ...

  8. 解决input[type=file]打开时慢、卡顿问题

    经过测试发现,在mac里面safari.Firefox.Chrome(opera不知道为啥老闪退)都没有卡顿问题 在windows里面,Firefox不卡顿,只有Chrome卡顿. 然而,这个插件是从 ...

  9. 输入类型<input type="number"> / input标签的输入限制

    输入限制 属性 描述 disabled 规定输入字段应该被禁用. max 规定输入字段的最大值. maxlength 规定输入字段的最大字符数. min 规定输入字段的最小值. pattern 规定通 ...

随机推荐

  1. AOP的实现原理

    1 AOP各种的实现 AOP就是面向切面编程,我们可以从几个层面来实现AOP. 在编译器修改源代码,在运行期字节码加载前修改字节码或字节码加载后动态创建代理类的字节码,以下是各种实现机制的比较. 类别 ...

  2. source /etc/profile报错-bash: id:command is not found

    由于误操作导致 source /etc/profile 报错 -bash: id:command is not found 此时,linux下很多命令到不能能用,包括vi ls 等... 可以使用 e ...

  3. nginx ssi 模块

    在nginx下与SSI配置相关的参数主要有ssi  ssi_sclient_error ssi_types三个.具体的用法如下 ssi on 开启ssi支持,默认是off ssi_silent_err ...

  4. UIMenuItem

    UIMenuItem *share = [[UIMenuItem alloc] initWithTitle:@"分享"action:@selector(shareClick:)]; ...

  5. get和post的区别

    http://localhost:8080/shopc/check.do?username=zhangsan&pwd=123456 http://localhost:8080/shopc/ch ...

  6. ASP.NET MVC Controllers and Actions

    MVC应用程序里的URL请求是通过控制器Controller处理的,不管是请求视图页面的GET请求,还是传递数据到服务端处理的Post请求都是通过Controller来处理的,先看一个简单的Contr ...

  7. mysql想要别人远程能连接

    mysql -u root -pvmware mysql>use mysql; mysql>update user set host = '%' where user = 'root'; ...

  8. 关于docker在windows环境下运行的第一次体验

    关于docker在windows环境下执行的原理 1.1.           首先是Docker Quickstart启动,如果在虚拟机Oracle VM VirtualBox不存在default虚 ...

  9. android存储方式的应用场景

    作为一个完整的应用程序,数据存储操作是必不可少的.因此,Android系统一共提供了四种数据存储方式.分别是:SharePreference.文件存储.SQLite. Content Provider ...

  10. AutoMapper的使用

    1.AutoMapper简单介绍 官网:http://automapper.org/ 源码:https://github.com/AutoMapper/AutoMapper NUGET安装: PM&g ...