Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
嗨,有人知道如何制作此表单效果:http ://www.clouddigitalmedia.co.uk/contact-us当您单击表单字段时,即使您将鼠标移离该字段,它也会平滑突出显示,除非您点击框外的单击按钮。
我不确定这是否是 CSS3 的东西,或者可能有一个 jQuery。
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
:focus
input{ /*Transition Properties*/ } input:focus{ border:2px solid blue; }
http://jsfiddle.net/dZ4Jh/2/