纯css实现搜索特效
代码语言:html
所属分类:搜索
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Search Input With Animation</title> <link href='https://maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css' rel='stylesheet' /> <style> html { background: #1f80aa; } body { width: 300px; margin: 0 auto; padding-top: 8rem; } fieldset { position: relative; display: inline-block; padding: 0 0 0 40px; background: #fff; border: none; border-radius: 5px; } input, button { position: relative; width: 200px; height: 50px; padding: 0; display: inline-block; float: left; } input { color: #666; z-index: 2; border: 0 none; } input:focus { outline: 0 none; } input:focus + button { -webkit-transform: translate(0, 0); -ms-transform: translate(0, 0); transform: translate(0, 0); -webkit-transition-duration: 0.3s; transition-duration: 0.3s; } input:focus + button .fa { -webkit-transform: translate(0px, 0); .........完整代码请登录后点击上方下载按钮下载查看
网友评论0