.searchbox { display: none; perspective: 50em; top: 0; left: 0; width: 100%; height: 100%; z-index: 100; background: rgba(0, 0, 0, 0.7); transform-origin: 0%; perspective-origin: top center; } .searchbox.show { display: block; } .searchbox, .searchbox .searchbox-container { position: fixed; } .searchbox .searchbox-container { overflow: hidden; } .searchbox .searchbox-selectable { cursor: pointer; } .searchbox .searchbox-input-wrapper { position: relative; } .searchbox .searchbox-input-wrapper .searchbox-input { width: 100%; border: none; outline: none; font-size: 16px; box-shadow: none; font-weight: 200; border-radius: 0; background: #fff; line-height: 20px; box-sizing: border-box; padding: 12px 28px 12px 20px; border-bottom: 1px solid #e2e2e2; } .searchbox .searchbox-input-wrapper .searchbox-close { top: 50%; right: 6px; width: 20px; height: 20px; line-height: 20px; font-size: 16px; margin-top: -11px; position: absolute; text-align: center; display: inline-block; } .searchbox .searchbox-input-wrapper .searchbox-close:hover { color: #3273dc; } .searchbox .searchbox-result-wrapper { left: 0; right: 0; top: 45px; bottom: 0; overflow-y: auto; position: absolute; } .searchbox .searchbox-container { left: 50%; top: 100px; width: 540px; z-index: 101; bottom: 100px; margin-left: -270px; box-sizing: border-box; } @media screen and (max-width: 559px), screen and (max-height: 479px) { .searchbox .searchbox-container { top: 0; left: 0; margin: 0; width: 100%; height: 100%; background: #f7f7f7; } }