Skip to content

Instantly share code, notes, and snippets.

View ZakharDay's full-sized avatar

ZakharDay ZakharDay

View GitHub Profile
body {
width: 700px;
height: 17386px;
margin: 0 auto;
background-image: url(dom_narkomfina_bg.jpg);
background-position: top center;
background-repeat: no-repeat;
}
h1, h2, h3 {
# If you have clickable element inside another clickable element
# you can handle outside element click with prevent default function
handleOutsideClick: (e) ->
# If you click on inside button you need to prevent outside action
if $(e.target).parents('.insideButton')
e.preventDefault()
# Else you can do what you want
else
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>UNIQ 101 000 Showcase</title>
<style>
html {
height: 100%;
}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>UNIQ 101 000 Showcase</title>
</head>
<body>
<div>Я элемент div, созданный благодаря тегу div. Div обозначает division — разделение. Я делю контент на части.</div>
/* Desktop Version */
@media all and (min-width: 401px) {
}
/* Mobile Version */
@media all and (max-width: 400px) {
body {
font-family: "HelveticaNeue-Light", Arial, sans-serif;
}
a {
text-decoration: none;
}
h1, h3 { font-size: 24px; }
h2 { font-size: 34px; }
$(function() {
$('#project1').on('click', function() {
$('#projectsWrapper').css('margin-left', '0');
$('#circlesWrapper li').removeClass('current');
$(this).addClass('current');
});
$('#project2').on('click', function() {
$('#projectsWrapper').css('margin-left', '-100vw');
$('#circlesWrapper li').removeClass('current');
$(this).addClass('current');
* {
box-sizing: border-box;
}
html, body {
height: 100%;
}
body {
font-family: 'PT Sans', sans-serif;
$(function() {
$('.scrollTo').each(function() {
$(this).on('click', function(e) {
var scrollTo;
e.preventDefault();
scrollTo = $(this).attr('href');
$('html,body').animate({
scrollTop: $(scrollTo).offset().top - 30
}, 1000);
});