Coding A CSS3 & HTML5 One Page Template | Tutorialzine demo

Создаем шаблон сайта с помощью CSS3 и HTML5

Разработка сайтов это та сфера, в которой необходимо постоянно следить за новинками. Необходимо всегда быть на гребне волны. Смена технологий происходит очень быстро и то, что популярно сейчас будет устаревшим через несколько лет.

Одна из таких новейших технологий — это HTML5 — новая версия базового языка для создания сайтов.

Сегодня мы создадим HTML5 шаблон для сайта используя новые возможности CSS3 и jQuery. Также при создании мы используем плагин scrollTo.

Также можно скачать XHTML версию данного шаблона!

Шаг 1 — Дизайн

Каждый процесс создания сайта начинается с идеи. В этой стадии дизайнеры обычно используют Photoshop для проработки всех деталей.

После этого весь дизайн кодируются с помощью HTML и CSS.

Шаг 2 — HTML

Важно заметить, что работа над HTML5 все еще ведется. И она по разным оценкам продлится до 2022 года (абсолютно серьезно). Однако, некоторые части уже готовы и ими можно пользоваться сегодня.

В этом уроке мы используем несколько новых тегов:

header — в него обернем нашу шапку

section — группирует контент в секции (к примеру, главная секция, сайдбар…)

article — отделяет статьи от всей страницы

figure — обычно содержит картинку-иллюстрацию к статье

Эти теги используются также, как и обычные div. Единственная разница заключается в том, что данные теги семантически разделяют страницу. Другими словами, Вы можете представить Вашу страницу таким образом, что станет сразу понятно про что она. В результате поисковики будут давать Вам целевых посетителей в бол ьшем количестве.

Однако, есть некоторые ограничения использования HTML5 сегодня. Одно из них — эта вся линейка браузеров Internet Explorer — они не поддерживают эти теги (но это можно решить добавив небольшой JavaScript ). Поэтому пока еще рановато полностью переходить на HTML5.

Поэтому в начале урока Вам также доступна ссылка на скачивание такого же шаблона, но в XHTML версии (работает во всех браузерах сейчас).

         
-->

Photoshoot Effect

тег для отображения картинки для статьи -->

In this tutorial, we are creating a photo shoot effect with our just-released PhotoShoot jQuery plug-in. With it you can convert a regular div on the page into a photo shooting stage simulating a camera-like feel.

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer luctus quam quis .

Разметка вверху будет для каждой статьи. Вначале идет разделяющая полоса (по типу hr сейчас ). Далее идет новый тег article с уникальным ID, который используется для прокрутки страницы.

Внутри статьи также присутствует новый тег для показа картинок к статье.

  
Маркируем футер --> Закрываем секцию #page --> файлы -->

В конце у нас идет тег футера.

Шаг 3 — CSS

Поскольку мы используем HTML5, нам необходимо предпринять дополнительны меры для стилизации. Теги новой версии HTML не содержат стилей по умолчанию пока еще. Но это легко поправить несколькими дополнительными строками CSS и страница будет выглядет так, как это необходимо.

header,footer, article,section, hgroup,nav, figure < display:block; >article .line< /* Разделяющая полоса: */ background-color:#15242a; border-bottom-color:#204656; margin:1.3em 0; > footer .line < margin:2em 0; >nav < background:url(img/gradient_light.jpg) repeat-x 50% 50% #f8f8f8; padding:0 5px; position:absolute; right:0; top:4em; border:1px solid #FCFCFC; -moz-box-shadow:0 1px 1px #333333; -webkit-box-shadow:0 1px 1px #333333; box-shadow:0 1px 1px #333333; >nav ul li < display:inline; >nav ul li a, nav ul li a:visited < color:#565656; display:block; float:left; font-size:1.25em; font-weight:bold; margin:5px 2px; padding:7px 10px 4px; text-shadow:0 1px 1px white; text-transform:uppercase; >nav ul li a:hover < text-decoration:none; background-color:#f0f0f0; >nav, article, nav ul li a,figure< /* Applying CSS3 rounded corners: */ -moz-border-radius:10px; -webkit-border-radius:10px; border-radius:10px; >

Нам необходимо установить значение правила display на block для новых тегов. После этого можем обращаться с ними также, как и с обычными тегами.

Мы придаем стиль горизонтальной линии, статьям, и кнопкам навигации. В самом низу мы прописываем свойство border-radius для четырех разных типов элементов сразу для экономии.

/* Стили для статей: */ #page < width:960px; margin:0 auto; position:relative; >article < background-color:#213E4A; margin:3em 0; padding:20px; text-shadow:0 2px 0 black; >figure < border:3px solid #142830; float:right; height:300px; margin-left:15px; overflow:hidden; width:500px; >figure:hover < -moz-box-shadow:0 0 2px #4D7788; -webkit-box-shadow:0 0 2px #4D7788; box-shadow:0 0 2px #4D7788; >figure img < margin-left:-60px; >/* Стили для футера: */ footer < margin-bottom:30px; text-align:center; font-size:0.825em; >footer p < margin-bottom:-2.5em; position:relative; >footer a,footer a:visited < color:#cccccc; background-color:#213e4a; display:block; padding:2px 4px; z-index:100; position:relative; >footer a:hover < text-decoration:none; background-color:#142830; >footer a.by < float:left; >footer a.up

Во второй части кода мы придаем более детальные стили нашим объектам.

Давайте перейдем к последнему шагу.

Шаг 4 — jQuery

Для модернизации данного шаблона мы создадим плавный эффект скролла после нажатия на ссылку с использованием jQuery плагина scrollTo. Для его работы необходимо пройтись по всем ссылкам и присвоить событие onclick, которое вызовет функцию $.srollTo(), описанную в скрипте плагина.

$(document).ready(function()< /* Выполнение скрипта после загрузки страницы */ $('nav a,footer a.up').click(function(e)< // Если нажата ссылка - плавный скролл к нужному объекту: $.scrollTo( this.hash || 0, 1500); e.preventDefault(); >); >);

В этом уроке мы ознакомились с возможностями новых семантических свойств HTML5 и их помощью создали одностраничный красивый шаблон. Можете использовать его в собственных целях.

Данный урок подготовлен для вас командой сайта ruseller.com

Источник

How to Make A blog Template Design Using HTML CSS

hello viewers, in this article I will tell you how to create custom blog template design help of html CSS. this template is very simple and very attractive. you have seen lots of blog template on internet but this different by all. because we are not use a download template design. we create design by your manual coding. you can easily modify this template design to your need according. this blog theme is based on two main colours first one is blue colour and second one is black colour you can see that on this project. colour combination is main part of your template because if your colour choice is not good so that your template design is also not looks good. when you create a web template design two main things you have one is web template fonts and second one is web template colour combination. if you have chased correct colour and fonts. then your web template design looking are very attractive and unique.

now you can copy the source code in below and then paste your html document

Blog
  • Latest
  • Contact
  • actually want to read

    Latest stories


    Get our weekly email

    Copy the css code in below and paste your css document

    :root < --main: #7b4ee4 ; --darkblue: #362078; --black: #060606; --white: #e7dff4; >* < margin: 0px; padding: 0px; font-family: system-ui; >.clearfix < clear: both; >header < padding: 20px 0px; box-shadow: 2px 2px 15px var(--black); >.container < width: 1140px; max-width: 100%; margin: 0 auto; >.col-div-6 < width: 50%; float: left; >.logo < font-weight: bold; font-size: 25px; color: var(--black); >.logo span < color: var(--main); >.nav < float: right; >.nav li < list-style: none; float: left; padding: 3px 20px; >.nav li a < text-decoration: none; color: var(--black); >.nav li button < padding: 7px 15px; background: var(--main); color: white; border: none; border-radius: 5px; cursor: pointer; margin-top: -5px; >.banner-section < background: var(--main); height: 400px; overflow: hidden; >.heading < color: var(--white); font-size: 40px; letter-spacing: 1px; margin-top: 14%; >.p1 < color: white; width: 395px; margin-top: 20px; margin-bottom: 20px; letter-spacing: 1px; font-size: 14px; >.input-box < box-shadow: 1px 7px 8px 0px #222121; width: 360px; border-radius: 50%; >.input-box input[type="text"] < padding: 9px; width: 265px; border: none; border-radius: 5px; outline: none; >.input-box button < padding: 10px 27px; border-radius: 0px 5px 5px 0px; border: none; margin-left: -6px; background: var(--darkblue); color: white; cursor: pointer; >.ban-img < width: 250px; margin-bottom:-50px; >.b-img < width: 100%; border-radius: 10px; >.heading1 < margin-top: 20px; color: var(--main); font-size: 14px; text-transform: uppercase; >.blog-heading < font-size: 29px; font-weight: bold; margin-bottom: 20px; color: var(--black); >.text < font-size: 13px; letter-spacing: 1px; color: var(--black); margin-bottom: 20px; >.name < text-transform: uppercase; font-weight: 600; color: #a1a1a1; font-size: 14px; >.lr-box < padding: 10px 20px; >.b-img-1 < width: 100%; height: 160px; border-radius: 10px; margin-top: 7px; >.blog-heading-1 < font-size: 20px; font-weight: bold; margin-bottom: 20px; color: var(--black); >.line < width: 100%; margin-top: 15px; border: none; height: 1px; background: #ddd; >.lr-box:hover < opacity: 0.5; cursor: pointer; >.box-1:hover < opacity: 0.5; cursor: pointer; >.box-2 < width: 28.5%; float: left; margin: 25px; >.box-2:hover < opacity: 0.5; cursor: pointer; >.foot-section < background: var(--main); >.foot-inner < width: 500px; margin: 0 auto; padding: 50px; text-align: center; >.ibox2 < margin: 0 auto; width: 380px; >footer < background:var(--darkblue); padding: 15px; >footer p

    if you have any problem to understand this code then you please watch this video tutorial also

    Источник

    19 article UI Design Examples

    Articles are one of the most important part of your blog. It provides your visitors with the information you want to convey to them. Here you will find various blog article designs for your inspiration.

    Use a combination of this and blog archive designs to make your blog stand apart from the rest.

    HTML, CSS Code Snippets for article

    Styling for Podcast Transcription or Guest Interviews

    Split Screen Text and Image with Load More on Scroll

    Fading In Card Layout for Title and Content Articles on Scroll

    Scroll Up or Down to Fade In the In View Sub Title on a Page

    If you are doing long-form article it’s helpful to break it up into smaller sections and with.
    Read More

    If you have a blog post and want to add some flare to the featured image and the title then this.
    Read More

    Image Slide In Scroll Animation

    This is an image effect designed by Joshua Ward where the images in the article slides in from the.
    Read More

    Responsive 2 Column Article Card Layout

    Responsive 2 Column Article Card Layout

    An elegant 2 column article layout inspired by card UI, created by Thomas Vaeth based on this.
    Read More

    15 Amazing Free UI/UX Kits

    The CodeMyUI team has put together a list of 15 Free UI/UX kits that we think will not only inspire.
    Read More

    Hero Image Zoom In on Scroll and Load Article

    Hero Image Zoom In on Scroll and Load Article

    If you are looking to give some visual flair for the hero image in you next article then you can.
    Read More

    Expanding Card UI to Reveal Blog Content

    Expanding Card UI to Reveal Blog Content

    If you need to show a grid of content with offset image thumbnails and titles in a card, that.
    Read More

    Источник

    HTML Tag

    Three articles with independent, self-contained content:

    Google Chrome

    Google Chrome is a web browser developed by Google, released in 2008. Chrome is the world's most popular web browser today!

    Mozilla Firefox

    Mozilla Firefox is an open-source web browser developed by Mozilla. Firefox has been the second most popular web browser since January, 2018.

    Microsoft Edge

    Microsoft Edge is a web browser developed by Microsoft, released in 2015. Microsoft Edge replaced Internet Explorer.

    More "Try it Yourself" examples below.

    Definition and Usage

    The tag specifies independent, self-contained content.

    An article should make sense on its own and it should be possible to distribute it independently from the rest of the site.

    Potential sources for the element:

    Note: The element does not render as anything special in a browser. However, you can use CSS to style the element (see example below).

    Browser Support

    The numbers in the table specify the first browser version that fully supports the element.

    Element
    6.0 9.0 4.0 5.0 11.1

    Источник

    Читайте также:  На чем пишут на java
    Оцените статью