http://blog.csdn.net/do_it__/article/details/6789699

<input type="text" placeholder="search word" name="p" />

但是在chrome下显示的search word并不能垂直居中。

后来找了很久终于在stackoverflow上找到了对应的方法。

参考:http://stackoverflow.com/questions/4919680/html5-placeholder-css-padding-problem

就是一句:把line-height设置为normal

line-height: normal; /* for non-ie */
line-height: 22px\9; /* for ie */

chrome下input[type=text]的placeholder不垂直居中的问题解决的更多相关文章

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

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

  2. html5与js关于input[type='text']文本框value改变触发事件一些属性的区别oninput,onpropertychange,onchange和文本框的value点击全选状态onclick="select();"。做购物车页面时会要用到。

    关于input[type='text']文本框value改变触发事件一些属性的区别oninput,onpropertychange,onchange和文本框的点击全选状态onclick="s ...

  3. html <input type="text" />加上readonly后在各种浏览器的差异。

    <html> <body> <p>Name:<input type="text" name="email" /> ...

  4. Chrome 下input的默认样式

    一.去除默认边框以及padding border: none;padding:0 二.去除聚焦蓝色边框 outline: none; 三.form表单自动填充变色 1.给input设置内置阴影,至少要 ...

  5. input type =text,按回车键自动提交

    1.当form表单中只有一个<input type="text" name='name' />时按回车键将会自动将表单提交 <form id='form1' ac ...

  6. JavaScript通过preventDefault()使input[type=text]禁止输入但保留光标

    一.说明 取消事件的默认动作. 该方法将通知 Web 浏览器不要执行与事件关联的默认动作(如果存在这样的动作).例如,如果 type 属性是 "submit",在事件传播的任意阶段 ...

  7. js让text值不可改变,同<input type="text" readonly="readonly" />

    <input type="text" size="60"  name="j01" value="www.52jscn.com ...

  8. <input type="text"/>未输入时属性value的默认值--js学习之路

    在百度ife刷题是自己的一个错误引发了我对<input type="text"/>的学习. 先贴代码: <!DOCTYPE html> <html&g ...

  9. input[type=text]点击之后无边框, 一进页面就显示光标

    1.input[type=text]点击之后无边框 :outline:none; 2. 一进页面就显示光标: <script Language="javascript"> ...

随机推荐

  1. Static Resources In ASP.NET Core 1.0

    静态资源包括HTML,CSS,图片和Js文件.在ASP.NET Core 1.0中,静态资源默认的所在目录是wwwroot,wwwroot可以在project.json中定义. Steps: 在www ...

  2. enum枚举类型的使用

    修饰符为public static enum,不用加final,否则提示错误. 枚举类的所有实例必须在枚举类中显式列出(,分隔,; 结尾).列出的实例系统会自动添加 public static fin ...

  3. Parameter of Revit API – 19: Add FamilyParameter (FamilyManager.AddParameter)

      New family parameters (FamilyParameter) can be added to a family document through the FamilyManage ...

  4. WPF在DLL中读取Resource的方法

    WPF是个用户控件,被WinForm调用.而WinForm是在一个DLL类库中被调用.试了很多方法,都无法将Resource中的图读进程序.用下面的方法总算实现了.   /根据图片的名称,从资源中找到 ...

  5. CF# 334 Lieges of Legendre

    C. Lieges of Legendre time limit per test 2 seconds memory limit per test 256 megabytes input standa ...

  6. ccc 函数中写函数

    attackOnTarget: function (atkDir, targetPos) { var self = this; let deg = cc.radiansToDegrees(cc.pAn ...

  7. hadoop 流streaming跑python程序

    先放上命令: hadoop jar /usr/hadoop-/contrib/streaming/hadoop-streaming-.jar -mapper mapper.py -file mappe ...

  8. 51Nod 1256 乘法逆元 Label:exgcd

    1256 乘法逆元 基准时间限制:1 秒 空间限制:131072 KB 分值: 0 难度:基础题 给出2个数M和N(M < N),且M与N互质,找出一个数K满足0 < K < N且K ...

  9. android实现两个页面跳转

    1.实现两个界面之间转换 在安卓当中,最常见的就是按下按钮之后跳转到第二个界面. 关键代码很简单: 这是以bn2按钮为例,当前Activity为MainActivity,跳转到Registration ...

  10. 【MongoDB】2014-07-25T11:00:48.634+0800 warning: Failed to connect to 127.0.0.1:27017, reason: errno:10061 由于目标计算机积极拒绝,无法连接。

    1:启动MongoDB 2014-07-25T11:00:48.634+0800 warning: Failed to connect to 127.0.0.1:27017, reason: errn ...