更改输入背景颜色 [英] Change Input Background color

查看:81
本文介绍了更改输入背景颜色的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,


我在许多网站上都看到过这种情况,例如谷歌,输入当我点击

他们写点东西时他们会改变自己的风格。这适用于

Firefox和IE(这些是我试过的)


我该怎么做?

谢谢,

Miguel

解决方案

2007年6月7日星期四15:28 :55 + 0200,shapper< md ***** @ gmail.comwrote:


你好,


我在许多网站上看到,比如谷歌,输入当我点击

他们写点东西时他们会改变自己的风格。这适用于

Firefox和IE(这些是我尝试过的)


我该怎么做?



不使用纯CSS。


您可以在onclick / onfocus / onchange / etc上更改类。事件与

javascript。确保您的输入字段在旧样式中清晰易读。

适用于禁用javascript的用户。


HTH,

- -

Rik Wasmus


Rik写道:


On Thu,Jun Jun 2007 15:28:55 +0200,shapper< md ***** @ gmail.comwrote:


>我在很多网站上都看到过Google指出,当我点击它们来写一些东西时,他们会改变自己的风格。

我该怎么做?



不是纯CSS。



当然可以,只是不在IE中。

输入:focus {background:#000;颜色:#fff}


-

Berg


6月7日,7:28 am,shapper< mdmo ... @ gmail.comwrote:


您好,


我在很多网站上看到在Google中,输入当我点击

时,他们会写一些东西,改变他们的风格。这适用于

Firefox和IE(这些是我尝试过的)


我该怎么做?



hey shapper,这有什么问题:
http://groups.google.com/group/comp....cbec6240ed42c6


Hello,

I see in many web sites, such in Google, inputs that when i click on
them to write something they change their style. This works both in
Firefox and IE (These are the ones with which I tried)

How can I do this?

Thanks,
Miguel

解决方案

On Thu, 07 Jun 2007 15:28:55 +0200, shapper <md*****@gmail.comwrote:

Hello,

I see in many web sites, such in Google, inputs that when i click on
them to write something they change their style. This works both in
Firefox and IE (These are the ones with which I tried)

How can I do this?

Not with pure CSS.

You can change classes on a onclick/onfocus/onchange/etc. event with
javascript. Make sure your input fields are well legible in the old style
for the people with javascript disabled.

HTH,
--
Rik Wasmus


Rik wrote:

On Thu, 07 Jun 2007 15:28:55 +0200, shapper <md*****@gmail.comwrote:

>I see in many web sites, such in Google, inputs that when i click on
them to write something they change their style.

How can I do this?


Not with pure CSS.

Sure you can, just not in IE.
input:focus {background: #000; color: #fff}

--
Berg


On Jun 7, 7:28 am, shapper <mdmo...@gmail.comwrote:

Hello,

I see in many web sites, such in Google, inputs that when i click on
them to write something they change their style. This works both in
Firefox and IE (These are the ones with which I tried)

How can I do this?

hey shapper, what is wrong with this:
http://groups.google.com/group/comp....cbec6240ed42c6


这篇关于更改输入背景颜色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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