html+css 实现搜索框

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Search Member</title>
  <style>
    /* Paste your CSS styles here */
    .search_member_container {
      width: calc(100% - 20px);
      height: 60px;
      position: fixed;
      top: 60px;
      z-index: 9999;

      display: flex;
      align-items: center;
      justify-content: center;
    }

    .search_container_start {
      width: 100%;
      height: 50px;
      background-color: white;
      border: 1px solid #efecec;
      position: relative;
    }

    .search_icon_container {
      width: 60px;
      height: 50px;
      position: absolute;
      left: 0;
      top: 0;
      display: flex;
      align-items: center;
      justify-content: center;
    }

    .search_icon {
      width: 20px;
      height: 20px;
    }

    .search_input_container {
      width: calc(100% - 100px);
      height: 50px;
      position: absolute;
      left: 60px;
      top: 0;
    }

    .search_input {
      width: 100%;
      height: 100%;
      border: none;
      outline: none;
      padding: 0;
      margin: 0;
    }

    .search_submit_btn_container {
      width: 100px;
      height: 50px;
      background-color: white;
      position: absolute;
      right: 0;
      top: 0;
      display: flex;
      align-items: center;
      justify-content: center;
    }

    .search_btn {
      width: 80%;
      height: 80%;
      background-color: #32cd80;
      border-radius: 10px;
      display: flex;
      align-items: center;
      justify-content: center;
      color: white;
    }
  </style>
</head>
<body>
<!-- Search Member Container -->
<div class="search_member_container">
  <!-- Search Input Container + Search Icon + Search Button -->
  <div class="search_container_start">
    <!-- Search Icon Container -->
    <div class="search_icon_container">
      <img class="search_icon" src="images/search.png" alt="Search Icon">
    </div>

    <!-- Search Input Container -->
    <div class="search_input_container">
      <input class="search_input" placeholder="搜索成员">
    </div>

    <!-- Search Submit Button Container -->
    <div class="search_submit_btn_container">
      <!-- Search Button -->
      <div class="search_btn">搜索</div>
    </div>
  </div>
</div>
</body>
</html>

相关推荐

  1. Ant Design Vue 搜索下拉

    2024-02-12 01:14:01       15 阅读

最近更新

  1. TCP协议是安全的吗?

    2024-02-12 01:14:01       18 阅读
  2. 阿里云服务器执行yum,一直下载docker-ce-stable失败

    2024-02-12 01:14:01       19 阅读
  3. 【Python教程】压缩PDF文件大小

    2024-02-12 01:14:01       18 阅读
  4. 通过文章id递归查询所有评论(xml)

    2024-02-12 01:14:01       20 阅读

热门阅读

  1. django中实现观察者模式

    2024-02-12 01:14:01       33 阅读
  2. The Water Pipe with a Building

    2024-02-12 01:14:01       33 阅读
  3. git初始化一个远程空仓库

    2024-02-12 01:14:01       37 阅读
  4. 04 使用gRPC实现客户端和服务端通信

    2024-02-12 01:14:01       31 阅读
  5. 前端架构: 脚手架开发流程中的难点梳理

    2024-02-12 01:14:01       32 阅读
  6. 双非本科准备秋招(22.1)—— 力扣二叉搜索树

    2024-02-12 01:14:01       26 阅读