一个坑,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. 使用visualvm远程监控JVM LINUX服务器配置方法

    (1)首先要修改JDK中JMX服务的配置文件,以获得相应的权限: 进入$JAVA_HOME所在的根目录的/jre/lib/management子目录下, a. 将jmxremote.password. ...

  2. js 隐式转换

    1.数字number与字符串string相加的就,最后会得到一个字符串string:'1'+3='13' 2.数字number与字符串string相减,最后会得到一个数字number:'1'-0=1, ...

  3. MapFile生成WMS

    MAP  NAME "HBWMS"  STATUS ON  SIZE 800 600  EXTENT 107.795 28.559 116.977 33.627  UNITS ME ...

  4. Atitit.软件兼容性原理与实践 v5 qa2.docx

    Atitit.软件兼容性原理与实践   v5 qa2.docx 1. Keyword2 2. 提升兼容性的原则2 2.1. What 与how 分离2 2.2. 老人老办法,新人新办法,只新增,少修改 ...

  5. Eclipse背景颜色设置(设置成豆沙绿色保护眼睛,码农保护色)

    菜单栏windows–>preferences–>general–>editors–>text editors中在Appearance color options下修改 bac ...

  6. [jquery]if条件句

    //写个网页用了多门语言,脑袋转不过来亚! //代码: if(){} else if(){} else {}

  7. Linux下安装nginx

    一直会使用nginx,也学习了好多nginx知识.也在本地安装过nginx,这次是第一次在正式的环境安装nginx,把这些记录下来总结经验. 一.安装环境 操作系统:CentOS release 6. ...

  8. 威佐夫博弈(Wythoff Game)

    有两堆石子,数量任意,可以不同.游戏开始由两个人轮流取石子.游戏规定,每次有两种不同的取法,一是可以在任意的一堆中取走任意多的石子:二是可以在两堆中同时取走相同数量的石子.最后把石子全部取完者为胜者. ...

  9. pcDuino-V2操作系统的安装-ubuntu/Android

    操作系统:(非虚拟机) zws@z-pc:~$ lsb_release -aNo LSB modules are available.Distributor ID: Ubuntu Descriptio ...

  10. PHP基础语法

             PHP:超级文本预处理器一,PHP的四对标记 <?php ?> <script language="php"> <script> ...