活动时在文本框周围产生发光效果 [英] Make glowing effect around the text box while active

查看:125
本文介绍了活动时在文本框周围产生发光效果的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在文本框内放置光标时,在文本框周围产生发光效果。
例如:只是将光标放在我们的stackoverflow.com的搜索文本框内。

Make glowing effect around the text box while placing the cursor inside the textbox. For example : just place the cursor inside the search textbox in our stackoverflow.com.

它是因为css,但我不知道如何实现它。 。

Its because of css, but i dont know how to achieve it.. Please help me.

推荐答案

虽然你在stackoverflow搜索框上观察到的效果可能是特定于浏览器是一种使用CSS实现所需内容的方法 :focus pseudo class:

While the effect you observe on the stackoverflow search box is probably browser specific (e.g. Google Chrome) there is a way to achieve what you want using the CSS :focus pseudo class:

#foo:focus { border: 2px solid red; }



<input id="foo" type="text"/>

这篇关于活动时在文本框周围产生发光效果的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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