Skip to content

Instantly share code, notes, and snippets.

@andreyshr
andreyshr / border-box
Created September 16, 2017 10:11
border-box
*,
*::before,
*::after {
box-sizing: inherit;
}
html {
box-sizing: border-box;
}
@andreyshr
andreyshr / clearfix
Created September 16, 2017 10:10
clearfix
.clearfix:after {
content: "";
display: table;
clear: both
}
@andreyshr
andreyshr / topButton
Last active September 16, 2017 10:04
topButton
<script>
$(function() {
$(window).scroll(function() {
if ($(this).scrollTop() != 0) {
$('#toTop').fadeIn();
} else {
$('#toTop').fadeOut();
}
});
$('#toTop').click(function() {