如何风格< input type =" text">在IE6 CSS? [英] How to style <input type="text"> in IE6 CSS?

查看:93
本文介绍了如何风格< input type =" text">在IE6 CSS?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有任何优雅的方式应用一个特定的风格到所有< input type =text> IE6下的元素?我可以用一些JavaScript,但我想知道是否有一个更优雅的方式做。

Is there any elegant way of applying a certain style to all <input type="text"> elements under IE6? I can do it with some JavaScript, but I was wondering if there was a more elegant way of doing it.

注意 - 我不能应用某个类到所有的文本框手。我想避免使用CSS表达式

Note - I cannot apply a certain class to all textboxes by hand. And I'd like to avoid CSS expressions.

推荐答案

AFAIK,IE6不支持属性选择器,所以我想答案是否定的。您必须使用以下方法之一:

AFAIK, IE6 does not support attribute selectors, so I think the answer is no. You'd have to use one of the following:


  1. 向所有< input type =text/> 元素。

  2. 按照您的建议使用JavaScript。

  1. Add a common class attribute to all <input type="text"/> elements.
  2. Use JavaScript, as you suggested.

这两个都是你想避免的。太糟糕了。

Both of which you want to avoid. Too bad.

这篇关于如何风格&lt; input type =&quot; text&quot;&gt;在IE6 CSS?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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