Home Web Front-end HTML Tutorial An animated loading navigation implemented in pure css3_html/css_WEB-ITnose

An animated loading navigation implemented in pure css3_html/css_WEB-ITnose

Jun 24, 2016 am 11:56 AM
css3 load animation navigation

I have introduced several navigation menus to you before, and today I will bring you another animated loading navigation implemented in pure CSS3. The navigation appears as an animation. The renderings are as follows:

Online preview Source code download

Implemented code.

html code:

 <ul class="main-menu">        <li class="main-menu-item active"><a href="#">Home</a></li><li class="main-menu-item">            <a href="#">About Us</a></li><li class="main-menu-item"><a href="#">Another Link</a></li><li                class="main-menu-item"><a href="#">And another</a></li><li class="main-menu-item"><a                    href="#">Stuff</a></li><li class="main-menu-item"><a href="#">Help</a></li><li class="main-menu-item">                        <a href="#">Contact</a></li></ul>
Copy after login

css code:

   *, *:after, *:before {  -moz-box-sizing: border-box;       box-sizing: border-box;  margin: 0;  padding: 0;}html, body {  background: #f0f0f0;  font-family: Helvetica, sans-serif;  height: 100%;}.main-menu {  margin: auto;  width: 960px;  text-align: center;  position: relative;  list-style-type: none;  margin-top: 2em;}.main-menu::after,.main-menu-item.active::after {  content: '';  display: inline-block;  position: absolute;}.main-menu::after {  width: 70%;  height: 2px;  background: #9B1C27;  -webkit-animation: menuLine 1s ease forwards;          animation: menuLine 1s ease forwards;  -webkit-transform: scaleX(0);      -ms-transform: scaleX(0);          transform: scaleX(0);  bottom: 0;  left: 0;  right: 0;  margin: auto;  opacity: 0;}@-webkit-keyframes menuLine {  to {    -webkit-transform: scaleX(1);            transform: scaleX(1);    opacity: 1;  }}@keyframes menuLine {  to {    -webkit-transform: scaleX(1);            transform: scaleX(1);    opacity: 1;  }}@-webkit-keyframes menuItem {  to {    -webkit-transform: translateY(0);            transform: translateY(0);    opacity: 1;  }}@keyframes menuItem {  to {    -webkit-transform: translateY(0);            transform: translateY(0);    opacity: 1;  }}.main-menu-item a {  display: block;  padding: 1em;  text-decoration: none;  color: #555;  opacity: 0;  -webkit-transform: translateY(40%);      -ms-transform: translateY(40%);          transform: translateY(40%);  -webkit-animation: menuItem .8s ease forwards;          animation: menuItem .8s ease forwards;  -webkit-transition: all .2s ease;          transition: all .2s ease;}.main-menu-item:nth-child(4) a {  -webkit-animation-delay: .4s;          animation-delay: .4s;}.main-menu-item:nth-child(3) a, .main-menu-item:nth-child(5) a {  -webkit-animation-delay: .5s;          animation-delay: .5s;}.main-menu-item:nth-child(2) a, .main-menu-item:nth-child(6) a {  -webkit-animation-delay: .6s;          animation-delay: .6s;}.main-menu-item:nth-child(1) a, .main-menu-item:nth-child(7) a {  -webkit-animation-delay: .7s;          animation-delay: .7s;}.main-menu-item {  display: inline-block;  position: relative;}.main-menu-item:hover a, .main-menu-item.active {  color: #9B1C27;}.main-menu-item:hover a::after, .main-menu-item.active::after {  width: 0;  height: 0;  border-bottom: .5em solid #9B1C27;  border-left: .5em solid transparent;  border-right: .5em solid transparent;  bottom: 0;  left: 0;  right: 0;  margin: auto;  opacity: 0;  -webkit-transform: translateY(0.05em);      -ms-transform: translateY(0.05em);          transform: translateY(0.05em);  -webkit-animation: menuItem .8s 1.2s ease forwards;          animation: menuItem .8s 1.2s ease forwards;}
Copy after login

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Error loading plugin in Illustrator [Fixed] Error loading plugin in Illustrator [Fixed] Feb 19, 2024 pm 12:00 PM

When launching Adobe Illustrator, does a message about an error loading the plug-in pop up? Some Illustrator users have encountered this error when opening the application. The message is followed by a list of problematic plugins. This error message indicates that there is a problem with the installed plug-in, but it may also be caused by other reasons such as a damaged Visual C++ DLL file or a damaged preference file. If you encounter this error, we will guide you in this article to fix the problem, so continue reading below. Error loading plug-in in Illustrator If you receive an "Error loading plug-in" error message when trying to launch Adobe Illustrator, you can use the following: As an administrator

CSS Animation: How to Achieve the Flash Effect of Elements CSS Animation: How to Achieve the Flash Effect of Elements Nov 21, 2023 am 10:56 AM

CSS animation: How to achieve the flash effect of elements, specific code examples are needed. In web design, animation effects can sometimes bring a good user experience to the page. The glitter effect is a common animation effect that can make elements more eye-catching. The following will introduce how to use CSS to achieve the flash effect of elements. 1. Basic implementation of flash First, we need to use the animation property of CSS to achieve the flash effect. The value of the animation attribute needs to specify the animation name, animation execution time, and animation delay time

Animation not working in PowerPoint [Fixed] Animation not working in PowerPoint [Fixed] Feb 19, 2024 am 11:12 AM

Are you trying to create a presentation but can't add animation? If animations are not working in PowerPoint on your Windows PC, then this article will help you. This is a common problem that many people complain about. For example, animations may stop working during presentations in Microsoft Teams or during screen recordings. In this guide, we will explore various troubleshooting techniques to help you fix animations not working in PowerPoint on Windows. Why aren't my PowerPoint animations working? We have noticed that some possible reasons that may cause the animation in PowerPoint not working issue on Windows are as follows: Due to personal

Stremio subtitles not working; error loading subtitles Stremio subtitles not working; error loading subtitles Feb 24, 2024 am 09:50 AM

Subtitles not working on Stremio on your Windows PC? Some Stremio users reported that subtitles were not displayed in the videos. Many users reported encountering an error message that said "Error loading subtitles." Here is the full error message that appears with this error: An error occurred while loading subtitles Failed to load subtitles: This could be a problem with the plugin you are using or your network. As the error message says, it could be your internet connection that is causing the error. So please check your network connection and make sure your internet is working properly. Apart from this, there could be other reasons behind this error, including conflicting subtitles add-on, unsupported subtitles for specific video content, and outdated Stremio app. like

How to set up ppt animation to enter first and then exit How to set up ppt animation to enter first and then exit Mar 20, 2024 am 09:30 AM

We often use ppt in our daily work, so are you familiar with every operating function in ppt? For example: How to set animation effects in ppt, how to set switching effects, and what is the effect duration of each animation? Can each slide play automatically, enter and then exit the ppt animation, etc. In this issue, I will first share with you the specific steps of entering and then exiting the ppt animation. It is below. Friends, come and take a look. Look! 1. First, we open ppt on the computer, click outside the text box to select the text box (as shown in the red circle in the figure below). 2. Then, click [Animation] in the menu bar and select the [Erase] effect (as shown in the red circle in the figure). 3. Next, click [

How to use Vue to implement typewriter animation effects How to use Vue to implement typewriter animation effects Sep 19, 2023 am 09:33 AM

How to use Vue to implement typewriter animation special effects Typewriter animation is a common and eye-catching special effect that is often used in website titles, slogans and other text displays. In Vue, we can achieve typewriter animation effects by using Vue custom instructions. This article will introduce in detail how to use Vue to achieve this special effect and provide specific code examples. Step 1: Create a Vue project First, we need to create a Vue project. You can use VueCLI to quickly create a new Vue project, or manually

After a two-year delay, the domestic 3D animated film 'Er Lang Shen: The Deep Sea Dragon' is scheduled to be released on July 13 After a two-year delay, the domestic 3D animated film 'Er Lang Shen: The Deep Sea Dragon' is scheduled to be released on July 13 Jan 26, 2024 am 09:42 AM

This website reported on January 26 that the domestic 3D animated film "Er Lang Shen: The Deep Sea Dragon" released a set of latest stills and officially announced that it will be released on July 13. It is understood that "Er Lang Shen: The Deep Sea Dragon" is produced by Mihuxing (Beijing) Animation Co., Ltd., Horgos Zhonghe Qiancheng Film Co., Ltd., Zhejiang Hengdian Film Co., Ltd., Zhejiang Gongying Film Co., Ltd., Chengdu The animated film produced by Tianhuo Technology Co., Ltd. and Huawen Image (Beijing) Film Co., Ltd. and directed by Wang Jun was originally scheduled to be released in mainland China on July 22, 2022. Synopsis of the plot of this site: After the Battle of the Conferred Gods, Jiang Ziya took the "Conferred Gods List" to divide the gods, and then the Conferred Gods List was sealed by the Heavenly Court under the deep sea of ​​Kyushu Secret Realm. In fact, in addition to conferring divine positions, there are also many powerful evil spirits sealed in the Conferred Gods List.

The final PV of the main animation 'Arknights: Winter Hidden Return' has been announced and will be launched on October 7 The final PV of the main animation 'Arknights: Winter Hidden Return' has been announced and will be launched on October 7 Sep 23, 2023 am 11:37 AM

The content that needs to be rewritten on this site is: 9 The content that needs to be rewritten is: Month The content that needs to be rewritten is: 23 The content that needs to be rewritten is: Daily News, the main line drama of the second season of the animated series "Arknights" "Arknights: Winter Hidden Return" has announced its final release. The content that needs to be rewritten is: PV. The content that needs to be rewritten is: 10. The content that needs to be rewritten is: 7. The content that needs to be rewritten is: 7 The content is: The content that needs to be rewritten is: 00:23 The content that needs to be rewritten is: Officially launched, click here to enter the official website of the theme. The content that needs to be re-written is: This site has noticed that "Arknights: Winter Hidden Return" is the sequel to "Arknights: Prelude to Dawn". The plot summary is as follows: In order to prevent the infected, a group of

See all articles