发光输入框
2014-03-23 15:43
218 查看
CSS3 transition 以及 box-shadow实现,要注意的是outline:none;
代码:
Demo:
顺便地,把这个样式应用到了下面的评论框中,博客园可以自己提交css,这个特爽
代码:
<!doctype html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Document</title> <style> body { text-align: center; } input[type='text'] { font-size: 14px; transition: box-shadow linear .2s, border-color linear .2s; margin-top: 100px; width: 200px; padding: 8px; border: 1px solid #aaaaaa; -webkit-border-radius: 5px; -moz-border-radius: 5px; border-radius: 5px; } input[type='text']:focus,input[type='text']:hover { outline: none; box-shadow: 0 0 15px rgba(152,188,235,1.0); border-color: rgba(152,188,235,1.0) } </style> </head> <body> <input type="text" /> </body> </html>
Demo:
顺便地,把这个样式应用到了下面的评论框中,博客园可以自己提交css,这个特爽
相关文章推荐
- 结点 链表 练习
- Listview异步加载缓存图片,解决快速滑动问题
- 移动搜索引擎-网页信息预处理
- svn代码部署版本控制
- 贪心法 hoj1003
- 设计模式之依赖倒置原则 C++
- 丑小鸭进化 之 UML入门篇
- hdu 1394 Minimum Inversion Number 线段树
- 信号量,等待队列,异步通知,驱动例子
- Hadoop 2.2.0 环境 HIVE 0.11安装
- Mysql Dump
- mysqli扩展库操作
- 非归档遭遇ORA-00333导致数据库无法open
- 取数
- C# 多态
- 贪心法 foj1574
- 哥德巴赫猜想--多少种两个质数的和
- (一)简单工厂模式
- 安卓开发入门:工具栏(Action Bar)
- python程序设计基础2:python数据类型习题