@font-face {
font-family: 'Web font';
src: url('webfont.woff2') format('woff2'),
url('webfont.ttf') format('truetype'), /* Только если нужна поддержка старых Android, иначе закомментировать */
url('webfont.woff') format('woff');
font-weight: normal;
font-style: normal;
}
<ifModule mod_deflate.c>
AddOutputFilterByType DEFLATE text/html text/plain text/xml application/xml application/xhtml+xml text/css text/javascript application/javascript application/x-javascript application/font-woff2 image/svg+xml
</ifModule>
<script>
jQuery('a[href*="#"]')
// Remove links that don't actually link to anything
.not('[href="#"]')
.not('[href="#0"]')
.on('click', function(event) {
event.preventDefault();
// On-page links
var _this = jQuery(this), id = _this.attr('href').substring(_this.attr('href').indexOf('#'));
if(jQuery(id).length > 0) {
// Figure out element to scroll to
var target = jQuery(this.hash);
target = target.length ? target : jQuery('[name=' + this.hash.slice(1) + ']');
// Does a scroll target exist?
if (target.length) {
// Only prevent default if animation is actually gonna happen
event.preventDefault();
jQuery('html, body').animate({
scrollTop: target.offset().top
}, 1000, function() {
});
}
} else {
window.location.href = _this.attr('href');
}
});
var target = window.location.hash;
// delete hash so the page won't scroll to it
window.location.hash = "";
// now whenever you are ready do whatever you want
// (in this case I use jQuery to scroll to the tag after the page has loaded)
$(window).on('load', function() {
if (jQuery(target).length) {
$('html, body').animate({
scrollTop: jQuery(target).offset().top
}, 700, 'swing', function () {});
}
});
jQuery(function(){
if(jQuery(target).length > 0) {
jQuery('html, body').animate({
scrollTop: jQuery(target).offset().top
}, 1000, function() {
history.pushState(null,null, target);
});
}
return false;
});
</script>
<script>
function myFunction() {
document.getElementById("myDropdown").classList.toggle("show");
}
function filterFunction() {
var input, filter, ul, li, a, i;
input = document.getElementById("myInput");
filter = input.value.toUpperCase();
div = document.getElementById("myDropdown");
a = div.getElementsByTagName("a");
for (i = 0; i < a.length; i++) {
if (a[i].innerHTML.toUpperCase().indexOf(filter) > -1) {
a[i].style.display = "";
} else {
a[i].style.display = "none";
}
}
}
jQuery(document).on('ready', function() {
var filter = jQuery('#myDropdown'), links = filter.find('a'), btn = jQuery('.dropbtn')
links.each(function(index, el) {
var _this = jQuery(el), attr_href = _this.attr('href'), re = new RegExp(attr_href.replace(/\\/g, ''),'ig');
if(re.test(window.location.pathname)) {
_this.addClass('selected');
btn.text(_this.text());
}
});
});
</script>
.drt a.selected {
background: #F48951;
color: #fff;
}
<script src="https://e-timer.ru/js/etimer.js"></script>
.eTimer, .etUnit, .etNumber, .etSep {
font-size: 60px;
}
.etSign {
font-size: 18px;
}
@media only screen and (max-width:860px) {
.eTimer, .etUnit, .etNumber, .etSep {
font-size: 40px;
}
.etSign {
font-size: 16px;
}
}
<a href="download.php?file=myfile.pdf">
/* Пишем скрипт */
<?php
if (
!isset($_GET["file"])
|| ($f=$_GET["file"])===false
|| ($fp=@fopen($f,"rb"))===false
|| ($fi=pathinfo($f))===false
|| ($fi["fsize"]=filesize($f))===false
|| strtolower($fi["extension"])!="pdf"
) die("Failed");
ob_start();
header("Accept-Ranges: bytes");
header("Content-Length: {$fi["fsize"]}");
header("Content-Type: application/pdf");
header("Content-Disposition: attachment; filename="{$fi["basename"]}"");
$sent = 0;
while ( !feof($fp) && $sent < $fi["fsize"] && ($buf = fread($fp, 8192)) != "" ){
echo $buf;
$sent += strlen($buf);
flush(); ob_flush();
}
fclose($fp);
exit;
?>
.g-recaptcha {
transform: scale(.83);
-webkit-transform: scale(.83);
transform-origin: 0 0;
-webkit-transform-origin: 0 0;
}
@media only screen and (max-width:420px) {
.g-recaptcha {
width: 230px;
transform: scale(.79);
-webkit-transform: scale(.79);
transform-origin: 0 0;
-webkit-transform-origin: 0 0
}
}
@media only screen and (max-width:340px) {
.g-recaptcha {
transform: scale(.75);
-webkit-transform: scale(.75);
transform-origin: 0 0;
-webkit-transform-origin: 0 0
}
}
<div class="wrapper">
<header class="header">
Верх
</header>
<main class="content">
Центр
</main>
</div>
<footer class="footer">
Низ
</footer>
</body>
<b>CSS с нормализацией.</b>
html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;}
html{-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}
article,aside,details,figcaption,figure,footer,header,hgroup,main,nav,section,summary{display:block}
audio,canvas,video{display:inline-block}
audio:not([controls]){display:none;height:0}
[hidden]{display:none}
a{outline:none; text-decoration: none;}
abbr[title]{border-bottom:1px dotted}
pre{white-space:pre;white-space:pre-wrap;word-wrap:break-word}
sub,sup{font-size:75%;line-height:0;position:relative}
sup{top:-0.5em}
sub{bottom:-0.25em}
fieldset{border:1px solid #c0c0c0;margin:0 2px;padding:.35em .625em .75em}
button,input,select,textarea{font-family:inherit;font-size:100%;margin:0}
button,input{line-height:normal}
button,html input[type="button"],input[type="reset"],input[type="submit"]{-webkit-appearance:button;cursor:pointer}
button[disabled],input[disabled]{cursor:default}
input[type="checkbox"],input[type="radio"]{box-sizing:border-box;padding:0}
input[type="search"]{-webkit-appearance:textfield;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}
input[type="search"]::-webkit-search-cancel-button,input[type="search"]::-webkit-search-decoration{-webkit-appearance:none}
button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}
textarea{overflow:auto;vertical-align:top}
input:focus,button:focus,select:focus,textarea:focus{outline:none}
table{border-collapse:collapse;border-spacing:0}
img { border: 0; }
:focus::-webkit-input-placeholder {color: transparent}
:focus::-moz-placeholder {color: transparent}
:focus:-moz-placeholder {color: transparent}
:focus:-ms-input-placeholder {color: transparent}
*{
padding: 0;
margin: 0;
}
html{height:100%;}
* html body{height:100%;}
html, body{
font-family: tahoma, Helvetica, sans-serif;
font-size: 14px;
height: 100%;
background: #fff;
}
.wrapper {
width: 100%;
min-width: 1100px;
min-height: 100%;
height: auto !important;
height: 100%;
}
.header {
width: 100%;
height: 150px;
background: #ffffff;
}
.content {
padding: 0 0 150px;
}
.footer {
margin: -245px auto 0;
min-width: 1100px;
height: 245px;
position: relative;
}
ul,li {
list-style: none;
margin: 0;
padding: 0;
text-align: left;
}
a{
text-decoration: none;
color: inherit;
}
.list{
width: 400px;
margin: 0 auto;
font-size: 20px;
text-align: center;
}
a, b, strong, h1, h2, h3, h4, h5, h6, i, div, input, textarea, button, select{
text-decoration: none;
-webkit-transition:color 200ms linear 0ms, background 200ms linear 0ms, border 200ms linear 0ms;
transition: color 200ms linear 0ms, background 200ms linear 0ms, border 200ms linear 0ms;
}
a img {
-webkit-transition:opacity 200ms linear 0ms;
transition: opacity 200ms linear 0ms;
opacity:1;
-moz-opacity:1;
filter:alpha(opacity=100);
}
a img:hover{
-webkit-transition:opacity 200ms linear 0ms;
transition: opacity 200ms linear 0ms;
opacity:0.5;
-moz-opacity:0.5;
filter:alpha(opacity=50);
}