分享web开发知识

注册/登录|最近发布|今日推荐

主页 IT知识网页技术软件开发前端开发代码编程运营维护技术分享教程案例
当前位置:首页 > 运营维护

css实现发光的input输入框

发布时间:2023-09-06 02:04责任编辑:白小东关键词:暂无标签

效果图截图:

案例代码示下:

<!DOCTYPE html><html> ???<head> ???????<meta charset="UTF-8"> ???????<title>发光输入框</title> ???????<style type="text/css"> ???????????input{width: 280px;height: 30px;} ???????????textarea{width: 280px;height: 80px;} ???????????input,textarea{ ???????????????-webkit-transition: all 0.30s ease-in-out; ???????????????-moz-transition: all 0.30s ease-in-out; ???????????????-ms-transition: all 0.30s ease-in-out; ???????????????-o-transition: all 0.30s ease-in-out; ???????????????outline: none; ???????????????padding: 3px 0 3px 3px; ???????????????margin: 5px 1px 3px 0; ???????????????border: #ddd 1px solid; ???????????} ???????????input:focus,textarea:focus { ???????????????box-shadow: 0 0 5px rgba(216,76,41,1); ???????????????padding: 3px 0 3px 3px; ???????????????margin: 5px 1px 3px 0; ???????????????border: rgba(216,76,41,1) 1px solid; ???????????} ???????</style> ???</head> ???<body> ???????<input type="text" name="" id="" value="" /> ???????<textarea></textarea> ???</body></html>

  

注意:
  1. 这里使用了css的 transition 动画属性
  2. transition浏览器兼容性,添加浏览器厂商前缀

css实现发光的input输入框

原文地址:https://www.cnblogs.com/agansj/p/9339043.html

知识推荐

我的编程学习网——分享web前端后端开发技术知识。 垃圾信息处理邮箱 tousu563@163.com 网站地图
icp备案号 闽ICP备2023006418号-8 不良信息举报平台 互联网安全管理备案 Copyright 2023 www.wodecom.cn All Rights Reserved