https://nicepage.com/ru/ht/24662/klio-nyuton-html-shablon
Рубрика: HTML
Онлайн-генератор картинок-заглушек
https://imgholder.ru/
32 CSS Border Animations
https://freefrontend.com/css-border-animations/
7 CSS-анимаций с использованием SVG + сайты применяющие эффект
Анимация пузырьков. 7 CSS-анимаций с использованием SVG + сайты применяющие эффект
Производительность загрузки страницы
Вариант
|
1 2 3 4 5 6 7 8 9 10 11 |
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8" /> <title>Script at the end of page</title> </head> <body> <!-- All the HTML content here --> <script src="index.js"></script> </body> </html> |
2. Вариант
|
1 2 3 4 5 6 7 8 9 10 11 |
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8" /> <title>Script with async attribute</title> <script async src="index.js"></script> </head> <body> <!-- All the HTML content here --> </body> </html> |
3. Вариант
|
1 2 3 4 5 6 7 8 9 10 11 |
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8" /> <title>Script with defer attribute</title> <script defer src="index.js"></script> </head> <body> <!-- All the HTML content here --> </body> </html> |
Модальное окно
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 |
<!DOCTYPE html> <html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style> body {font-family: Arial, Helvetica, sans-serif;} /* The Modal (background) */ .modal { display: none; /* Hidden by default */ position: fixed; /* Stay in place */ z-index: 1; /* Sit on top */ padding-top: 100px; /* Location of the box */ left: 0; top: 0; width: 100%; /* Full width */ height: 100%; /* Full height */ overflow: auto; /* Enable scroll if needed */ background-color: rgb(0,0,0); /* Fallback color */ background-color: rgba(0,0,0,0.4); /* Black w/ opacity */ } /* Modal Content */ .modal-content { background-color: #fefefe; margin: auto; padding: 20px; border: 1px solid #888; width: 80%; } /* The Close Button */ .close { color: #aaaaaa; float: right; font-size: 28px; font-weight: bold; } .close:hover, .close:focus { color: #000; text-decoration: none; cursor: pointer; } </style> </head> <body> <h2>Modal Example</h2> <!-- Trigger/Open The Modal --> <button id="myBtn">Open Modal</button> <!-- The Modal --> <div id="myModal" class="modal"> <!-- Modal content --> <div class="modal-content"> <span class="close">×</span> <p>Some text in the Modal..</p> </div> </div> <script> // Get the modal var modal = document.getElementById("myModal"); // Get the button that opens the modal var btn = document.getElementById("myBtn"); // Get the <span> element that closes the modal var span = document.getElementsByClassName("close")[0]; // When the user clicks the button, open the modal btn.onclick = function() { modal.style.display = "block"; } // When the user clicks on <span> (x), close the modal span.onclick = function() { modal.style.display = "none"; } // When the user clicks anywhere outside of the modal, close it window.onclick = function(event) { if (event.target == modal) { modal.style.display = "none"; } } </script> </body> </html> |
Табы для сайта
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 |
<!DOCTYPE html> <html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style> body {font-family: Arial;} /* Style the tab */ .tab { overflow: hidden; border: 1px solid #ccc; background-color: #f1f1f1; } /* Style the buttons inside the tab */ .tab button { background-color: inherit; float: left; border: none; outline: none; cursor: pointer; padding: 14px 16px; transition: 0.3s; font-size: 17px; } /* Change background color of buttons on hover */ .tab button:hover { background-color: #ddd; } /* Create an active/current tablink class */ .tab button.active { background-color: #ccc; } /* Style the tab content */ .tabcontent { display: none; padding: 6px 12px; -webkit-animation: fadeEffect 1s; animation: fadeEffect 1s; } /* Fade in tabs */ @-webkit-keyframes fadeEffect { from {opacity: 0;} to {opacity: 1;} } @keyframes fadeEffect { from {opacity: 0;} to {opacity: 1;} } </style> </head> <body> <h3>Fade in Tabs</h3> <div class="tab"> <button class="tablinks" onclick="openCity(event, 'London')">London</button> <button class="tablinks" onclick="openCity(event, 'Paris')">Paris</button> <button class="tablinks" onclick="openCity(event, 'Tokyo')">Tokyo</button> </div> <div id="London" class="tabcontent"> <h3>London</h3> <p>London is the capital city of England.</p> </div> <div id="Paris" class="tabcontent"> <h3>Paris</h3> <p>Paris is the capital of France.</p> </div> <div id="Tokyo" class="tabcontent"> <h3>Tokyo</h3> <p>Tokyo is the capital of Japan.</p> </div> <script> function openCity(evt, cityName) { var i, tabcontent, tablinks; tabcontent = document.getElementsByClassName("tabcontent"); for (i = 0; i < tabcontent.length; i++) { tabcontent[i].style.display = "none"; } tablinks = document.getElementsByClassName("tablinks"); for (i = 0; i < tablinks.length; i++) { tablinks[i].className = tablinks[i].className.replace(" active", ""); } document.getElementById(cityName).style.display = "block"; evt.currentTarget.className += " active"; } </script> </body> </html> |
Убираем подчеркивание номеров на мобильных устройствах
|
1 |
<meta name="format-detection" content="telephone=no"> |
Замена фото по клику
|
1 2 3 4 5 6 7 8 9 |
$(function() { $('.select-list ul li').hover(function(){ var id = $(this).attr('id'); $('.select-list ul li').removeClass('active'); $(this).addClass('active'); $('.circle ul li').removeClass('active'); $('[data-pic="'+id+'"]').addClass('active'); }); }); |
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
.bl-1 .circle ul li.active(data-pic="image-1") img(src="/img/foto-list-1.jpg") li(data-pic="image-2") img(src="/img/foto-list-2.jpg") li(data-pic="image-3") img(src="/img/foto-list-3.jpg") li(data-pic="image-4") img(src="/img/foto-list-4.jpg") li(data-pic="image-5") img(src="/img/foto-list-5.jpg") li(data-pic="image-6") img(src="/img/foto-list-6.jpg") li(data-pic="image-7") img(src="/img/foto-list-7.jpg") li(data-pic="image-8") img(src="/img/foto-list-8.jpg") li(data-pic="image-9") img(src="/img/foto-list-9.jpg") li(data-pic="image-10") img(src="/img/foto-list-10.jpg") |
|
1 2 3 4 5 6 7 8 9 10 11 12 13 |
.bl-2 .select-list ul li.active(id="image-1") Мягкую мебель, кровати li(id="image-2") Шкафы, стулья, столы li(id="image-3") Бытовую технику li(id="image-4") Спортивный инвентарь, велосипеды li(id="image-5") Садовые инструменты, стройматериалы li(id="image-6") Автомобильную резину, шины li(id="image-7") Личные домашние вещи li(id="image-8") Туристическое снаряжение li(id="image-9") Сумки, чемоданы li(id="image-10") Архивы, документы |
Фото нужного размера и цвета
|
1 |
https://via.placeholder.com/387x258/DDDDDD/?text=foto |
создаем фото нужного размера и цвета
Блок карточек товаров
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
.parent-box { display: flex; flex-wrap: wrap; margin: -6px -6px; } .product-card { margin: 6px; background: #f00; } .child { width: calc(33.33% - 12px); color: #f00; } img { width: 100%; height: 100%; } |
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
<div class="parent-box"> <div class="product-card child"> <img src="https://via.placeholder.com/387x250" alt=""> </div> <div class="product-card child"> <img src="https://via.placeholder.com/387x250" alt=""> </div> <div class="product-card child"> <img src="https://via.placeholder.com/387x250" alt=""> </div> <div class="product-card child"> <img src="https://via.placeholder.com/387x250" alt=""> </div> <div class="product-card child"> <img src="https://via.placeholder.com/387x250" alt=""> </div> </div> |
400 крутых интернет-ресурсов на все случаи жизни
AdMe.ru с разрешения автора публикует отличный список из 400 очень полезных сервисов, которые помогут найти все — от источников вдохновения и стоковых фотографий до курсов программирования и создания email-рассылок. Бесплатные веб-сайты HTML5 UP: Адаптивные …