Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <div class="containerSearch">
- <input type="text" placeholder="Search Posts" class="filterPosts"/>
- <ul class="postsList">
- </ul>
- <div class="closeSearchContainer">
- <div class="closeSearch"></div>
- </div>
- </div>
- .containerSearch {
- position: relative;
- }
- .filterPosts {
- width: 0%;
- position: relative;
- float: right;
- transition: width 0.3s;
- transform: translateX(20%);
- border: none;
- box-sizing: border-box;
- padding-bottom: 100%;
- padding: 1% 1.5% 1% 2.5%;
- background: transparent;
- font-family: monospace;
- }
- .filterPosts:focus {
- outline: none;
- }
- .onInput {
- width: 100%;
- transition: width 0.3s;
- transform: translateX(0%);
- }
- .postsList {
- background: #F9F9FF;
- list-style: none;
- position: absolute;
- width: 100%;
- height: 0%;
- transition: height 0.2s;
- overflow: scroll;
- padding: 0%;
- box-sizing: border-box;
- border-bottom-left-radius: 15px;
- border-bottom-right-radius: 15px;
- top: 100%;
- box-shadow: 0px 2px 5px rgba(0,0,0,.2);
- }
- .postsList li {
- text-align: left;
- box-shadow: 0 0 1px rgba(0,0,0,.1) inset;
- padding: 3.5% 2% 3.5% 6%;
- }
- .postsList li:nth-child(odd) {
- background: #F1F1F7;
- }
- .postsList li:nth-child(even) {
- background: #F2F2FF;
- }
- .postsList li:last-child {
- border-bottom-left-radius: 15px;
- border-bottom-right-radius: 15px;
- }
- .postsList li a {
- text-decoration: none;
- color: #323232;
- font-family: monospace;
- font-weight: bold;
- }
- .onList {
- height: auto;
- transition: height 1s;
- top: 100%;
- padding: 2%;
- }
- .closeSearchContainer {
- background: #F9F9FF;
- box-shadow: 0px 2px 5px rgba(0,0,0,.2);
- padding: 2% 7% 2% 7%;
- position: absolute;
- top: 100%;
- right: 0%;
- opacity: 0;
- z-index: 5;
- transition: opacity 0.2s;
- border-bottom-left-radius: 15px;
- border-bottom-right-radius: 15px;
- }
- .closeActive {
- opacity: 1;
- transition: opacity 1.4s;
- }
- .closeSearch {
- width: 2.5px;
- height: 20px;
- background: black;
- transform: rotateZ(40deg);
- border-radius: 50px;
- }
- .closeSearch::before {
- content: '';
- width: 2.5px;
- height: 20px;
- background: black;
- position: absolute;
- transform: rotateZ(-80deg);
- border-radius: 50px;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement