为什么在IE中输入[type = text]不起作用 [英] Why input[type=text] is not working in IE

查看:263
本文介绍了为什么在IE中输入[type = text]不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有这样的样式:

 < style type =text / css> 
input [type = text] {
width:300px;
}
< / style>

上述代码适用于chrome和firefox。为什么不在IE?
我在Reports.aspx文件末尾的Reporting Services中使用此代码。

解决方案

它在IE8工作正常,假设页面加载在IE7或IE8标准模式

编辑



你说你使用的是IE8。在这种情况下,请使用开发人员工具(F12),找到您的文本框,并检查应用哪些样式。



/ p>

不知道您使用的报告服务版本。只是去了一个2000实例,并且报表管理器提供以怪异模式呈现的页面,所以好运气变得很多,样式工作。



Edit @



您可以通过添加元标记到aspx页面的头部。例如。 :

 < head> 
< meta http-equiv =X-UA-Compatiblecontent =IE = 100>
<! - 其余的< head> - >


I have some style like this:

<style type="text/css">
input[type=text]{
width:300px;
}
</style>

the above code works in chrome and firefox. Why not in IE? I am using this code in Reporting services at the end of Reports.aspx file.

解决方案

It works fine in IE8, assuming the page is loading in IE7 or IE8 standards mode (not quirks)

Edit

You've said you're using IE8. In which case, use the developer tools (F12), locate your text box, and check what styles are being applied.

Edit 2

Don't know which version of reporting services you're using. Just went to a 2000 instance, and the report manager is serving up pages that render in quirks mode, so good luck getting much, if any, styling to work.

Edit 3

You may be able to force IE to render in IE8 mode by adding a meta tag to the head within the aspx pages. E.g. :

<head>
<meta http-equiv="X-UA-Compatible" content="IE=100" >
<!-- Rest of <head> -->

这篇关于为什么在IE中输入[type = text]不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆