css+js实现三种搜索框点击展开效果代码

代码语言:html

所属分类:搜索

代码描述:css+js实现三种搜索框点击展开效果代码

代码标签: css js 三种 搜索框 点击 展开

下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开

<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">

<link type="text/css" rel="stylesheet" href="//repo.bfw.wiki/bfwrepo/css/all.6.3.0.css">
<style>
    * {
  margin: 0;
  box-sizing: border-box;
}

body {
  font-family: verdana, sans-serif;
  background-color: rgb(240, 240, 240);
}

.search-box-1 {
  position: relative;
  margin: 100px;
  border-radius: 10px;
  height: 60px;
  overflow: hidden;
  width: 300px;
  border-radius: 50%;
}
.search-box-1 .s-input {
  background-color: #fff;
  padding: 10px 20px;
  width: 0%;
  height: 100%;
  border: none;
  transition: all 1s;
}
.search-box-1.active .s-input:focus {
  width: 100%;
}
.search-box-1 .s-icon {
  position: absolute;
  left: 0;
  top: 0;
  width: 60px;
  height: 60px;
  border-radius: 10px;
  border: n.........完整代码请登录后点击上方下载按钮下载查看

网友评论0