Advertisement
TheReyzer

:(

Jul 14th, 2019
367
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
CSS 2.26 KB | None | 0 0
  1. <div class="containerSearch">
  2.         <input type="text" placeholder="Search Posts" class="filterPosts"/>
  3.        
  4.         <ul class="postsList">
  5.          
  6.         </ul>
  7.        
  8.        
  9.         <div class="closeSearchContainer">
  10.           <div class="closeSearch"></div>
  11.         </div>
  12.        
  13.       </div>
  14.  
  15.  
  16.  .containerSearch {
  17.    position: relative;
  18.  }
  19.  
  20.  .filterPosts {
  21.    width: 0%;
  22.    position: relative;
  23.    float: right;
  24.    transition: width 0.3s;
  25.    transform: translateX(20%);
  26.    border: none;
  27.    box-sizing: border-box;
  28.    padding-bottom: 100%;
  29.    padding: 1% 1.5% 1% 2.5%;
  30.    background: transparent;
  31.    font-family: monospace;
  32.  }
  33.  
  34.  .filterPosts:focus {
  35.    outline: none;
  36.  }
  37.  
  38.  .onInput {
  39.    width: 100%;
  40.    transition: width 0.3s;
  41.    transform: translateX(0%);
  42.  }
  43.  
  44.  .postsList {
  45.    background: #F9F9FF;
  46.    list-style: none;
  47.    position: absolute;
  48.    width: 100%;
  49.    height: 0%;
  50.    transition: height 0.2s;
  51.    overflow: scroll;
  52.    padding: 0%;
  53.    box-sizing: border-box;
  54.    border-bottom-left-radius: 15px;
  55.    border-bottom-right-radius: 15px;
  56.    top: 100%;
  57.    box-shadow: 0px 2px 5px rgba(0,0,0,.2);
  58.  }
  59.  
  60.  .postsList li {
  61.    text-align: left;
  62.    box-shadow: 0 0 1px rgba(0,0,0,.1) inset;
  63.    padding: 3.5% 2% 3.5% 6%;
  64.  }
  65.  
  66.  .postsList li:nth-child(odd) {
  67.    background: #F1F1F7;
  68.  }
  69.  
  70.  .postsList li:nth-child(even) {
  71.    background: #F2F2FF;
  72.  }
  73.  
  74.  .postsList li:last-child {
  75.    border-bottom-left-radius: 15px;
  76.    border-bottom-right-radius: 15px;
  77.  }
  78.  
  79.  .postsList li a {
  80.    text-decoration: none;
  81.    color: #323232;
  82.    font-family: monospace;
  83.    font-weight: bold;
  84.  }
  85.  
  86.  .onList {
  87.    height: auto;
  88.    transition: height 1s;
  89.    top: 100%;
  90.    padding: 2%;
  91.  }
  92.  
  93. .closeSearchContainer {
  94.   background: #F9F9FF;
  95.   box-shadow: 0px 2px 5px rgba(0,0,0,.2);
  96.   padding: 2% 7% 2% 7%;
  97.   position: absolute;
  98.   top: 100%;
  99.   right: 0%;
  100.   opacity: 0;
  101.   z-index: 5;
  102.   transition: opacity 0.2s;
  103.   border-bottom-left-radius: 15px;
  104.   border-bottom-right-radius: 15px;
  105. }
  106.  
  107. .closeActive {
  108.   opacity: 1;
  109.   transition: opacity 1.4s;
  110. }
  111.  
  112. .closeSearch {
  113.   width: 2.5px;
  114.   height: 20px;
  115.   background: black;
  116.   transform: rotateZ(40deg);
  117.   border-radius: 50px;
  118. }
  119.  
  120. .closeSearch::before {
  121.   content: '';
  122.   width: 2.5px;
  123.   height: 20px;
  124.   background: black;
  125.   position: absolute;
  126.   transform: rotateZ(-80deg);
  127.   border-radius: 50px;
  128. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement