<input>字体行高IE浏览器兼容性问题

时间:2019-08-04 14:27:04

标签: internet-explorer input

以下CSS代码在IE 11版本的浏览器中存在问题,行高应为36px,我缺少什么?

This is a screenshot of the problem

它在Chrome中显示正常。

input {
	display:block;
	width:100%;
	background:#fbfbfb;
	color:#666;
	font-size:.875rem;
	line-height:2;
	box-sizing:border-box;
	border:solid .0625rem #ccc;
	padding:.1875rem .5rem;
	margin-bottom:.875rem;
}
<form action="demo_form.asp">
    First name: <input type="text" name="fname" placeholder="First">
    Last name: <input type="text" name="lname" placeholder="Last">
    <input type="submit" value="Submit">
</form>

1 个答案:

答案 0 :(得分:0)

尝试为输入的文本元素添加 height 属性。

代码如下:

$('.related-entries:not(:has(~ .istax *))').hide()

在IE浏览器(IE 11版本)中的结果如下:

enter image description here

相关问题