0

嗨,有人知道如何制作此表单效果:http ://www.clouddigitalmedia.co.uk/contact-us当您单击表单字段时,即使您将鼠标移离该字段,它也会平滑突出显示,除非您点击框外的单击按钮。

我不确定这是否是 CSS3 的东西,或者可能有一个 jQuery。

4

1 回答 1

2

They are using the pseudo-class of :focus. This basically says that if the mouse has the text blinker inside of it, then apply the styles. Here is an example

input{
 /*Transition Properties*/
}
input:focus{
  border:2px solid blue;
}

http://jsfiddle.net/dZ4Jh/2/

于 2013-02-08T02:57:54.403 回答