js+css实现搜索按钮点击全屏放大搜索框代码

代码语言:html

所属分类:搜索

代码描述:js+css实现搜索按钮点击全屏放大搜索框代码

代码标签: js css 搜索 按钮 点击 全屏 放大 搜索框 代码

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

<!DOCTYPE html>
<html lang="en" >
<head>
  <meta charset="UTF-8">
<style>
    *, *:before, *:after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
  }
  
  html, body {
    height: 100%;
    background-image: url();
    background-size: cover;
  }
  
  .search-overlay {
    z-index: -1000;
    overflow: hidden;
    position: fixed;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
  }
  
  .search-overlay.s--active {
    z-index: 9999;
  }
  
  .scroll-cont {
    position: relative;
    height: 100%;
    overflow-y: auto;
  }
  
  .content {
    padding: 50px;
  }
  
  .search {
    position: relative;
    margin: 0 auto 50px;
    width: 100px;
    height: 100px;
    perspective: 1000px;
  }
  
  .search:not(.s--active) {
    cursor: pointer;
  }
  
  .search.s--hidden {
    opacity: 0;
  }
  
  .search.s--cloned {
    position: absolute;
    left: 50%;
    top: 50%;
    right: auto;
    bottom: auto;
    margin-left: -58px;
    margin-top: -58px;
    margin-right: 0;
    margin-bottom: 0;
  }
  
  .search.s--moving {
    transition: transform 0.4s .........完整代码请登录后点击上方下载按钮下载查看

网友评论0