为输入框和按钮添加发光效果
我正在制作 html 表单,我想为其添加效果。
是否可以有发光效果?
提交按钮是否也可以具有这种效果?
I'm in the middle of making my html form, and I want to add effects on it.
Is it possible for <input name="" type="text" class="" />
to have a glow effect?
Would it also be possible for the submit button to have this effect as well?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
这适用于类 Button
Per @Imoda
的所有输入这适用于文本类型的所有输入
并且仅在悬停时获取它:
This Works for all inputs of class Button
Per @Imoda
This works for all inputs of type text
And to get it only on hover:
您可以通过 Photoshop 或 Fireworks 创建对象或图稿,然后使用 CSS 文件将该图形导入到您的开发中。示例:
然后在 HTML 中,只需在按钮上调用该 div 即可。
You can create objects or artwork via Photoshop or Fireworks, then import that graphic into your development with your CSS file. Example:
Then in your HTML, just call that div on your button.
这将选择“文本”类型的输入。然后将
#FFFFFF
更改为您想要的任何颜色。理论上这应该有效。如果没有,请直接在每个冒号后面添加inset
。它不是精确的outer-glow
复制,但我相信它会满足您的需求。This will select your inputs that are the "text" type. Then change the
#FFFFFF
to whatever colour you wish. In theory this should work. If it doesn't, addinset
directly after each colon. It's not an exactouter-glow
replication, but I believe it'll suit your needs.