Skip to content

Instantly share code, notes, and snippets.

::-webkit-scrollbar {
display: none;
}
/* begin Media Max-Width
============================================================================ */
/* end Media Max-Width
============================================================================ */
/* -------------------------------------------------------------------------
begin
<button data-modal="call_back" class="modalPopUp">заказать звонок</button>
<div id="modal_overlay" class="hidden" role="dialog" aria-labelledby="modal_title">
<div class="modal_content" role="document">
<h1 class="modal_title">Заказать обратный звонок</h1>
<form action="contact.php" method="post" class="modal_form" data-modal="call_back_form">
<input type="text" id="f-name" class="modal_form-input" name="contact-name" required placeholder="Ваше имя">
<input type="tel" id="f-tel" class="modal_form-input" name="contact-phone" required placeholder="Номер телефона">
<input type="submit" value="Отправить" class="send">
<input type="button" name="cancel" value="X" aria-label="Close">
</form>
body {
overflow-x: hidden;
}
a {
text-decoration: none;
}
input,
select,
@alexandr-kazakov
alexandr-kazakov / block centering JS
Last active April 10, 2017 18:24
relative modal block centering Vanilla JS
function modalCentering(modal_arg) {
var modal = modal_arg;
modal.style.top = document.documentElement.clientHeight / 2 - modal.offsetHeight / 2 + 'px';
modal.style.left = document.documentElement.clientWidth / 2 - modal.offsetWidth / 2 + 'px';
if (modal.getBoundingClientRect().top < 0) modal.style.top = 0;
window.addEventListener('resize', function() {
modal.style.top = document.documentElement.clientHeight / 2 - modal.offsetHeight / 2 + 'px';
modal.style.left = document.documentElement.clientWidth / 2 - modal.offsetWidth / 2 + 'px';
if (modal.getBoundingClientRect().top < 0) modal.style.top = 0;
function pow(x,n) {
if (n != 1) {
return x *= pow(x,n - 1);
} else {
return x;
}
}
alert( pow(2,2,5)); // 8
<!-- begin Back to Top button -->
<a href="#" id="back-to-top" title="Back to top">&uarr;</a>
<!-- end Back to Top button -->
################################################################################
/* begin Back to Top Button */
#back-to-top {
position: fixed;
bottom: 40px;
/*
## 1741 to 1902
## 1681 to 1740
## 1537 to 1680
## 1367 to 1536
## 1367 to 1550
## 1201 to 1550
## 1201 to 1366
## 992 to 1200
###### 1 ######
<header id="page_header" class="page_header">
<div class="header_inner clearfix">
<div class="container">
<div class="container_inner clearfix">
<div class="header_inner_left">
<div class="mobile_menu_button"></div>
<div class="logo_wrapper"></div>
</div>
<div class="header_inner_right">
git log --pretty=format:"%h %ad | %s%d [%an]" --graph --date=short