欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

一款純css3實(shí)現(xiàn)的動(dòng)畫加載導(dǎo)航

  發(fā)布時(shí)間:2014-10-08 14:10:23   作者:佚名   我要評論
這篇文章主要為大家介紹了用css3實(shí)現(xiàn)的動(dòng)畫加載導(dǎo)航,該導(dǎo)航出現(xiàn)的時(shí)候以動(dòng)畫的形式出現(xiàn),下面請和腳本之家的小編一起來學(xué)習(xí)一下

今天為給大家再帶來一款純css3實(shí)現(xiàn)的動(dòng)畫加載導(dǎo)航。該導(dǎo)航出現(xiàn)的時(shí)候以動(dòng)畫的形式出現(xiàn)。效果圖如下:

html代碼:


復(fù)制代碼
代碼如下:
<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>

css代碼:


復(fù)制代碼
代碼如下:
*, *: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;
}

相關(guān)文章

  • CSS3 最強(qiáng)二維布局系統(tǒng)之Grid 網(wǎng)格布局

    CS3的Grid網(wǎng)格布局是目前最強(qiáng)的二維布局系統(tǒng),可以同時(shí)對列和行進(jìn)行處理,將網(wǎng)頁劃分成一個(gè)個(gè)網(wǎng)格,可以任意組合不同的網(wǎng)格,做出各種各樣的布局,本文介紹CSS3 最強(qiáng)二維布局系
    2025-02-27
  • 如何使用CSS3實(shí)現(xiàn)波浪式圖片墻

    本文介紹了如何使用CSS3的transform屬性和動(dòng)畫技巧實(shí)現(xiàn)波浪式圖片墻,通過設(shè)置圖片的垂直偏移量,并使用動(dòng)畫使其周期性地改變位置,可以創(chuàng)建出動(dòng)態(tài)且具有波浪效果的圖片墻,同
    2025-02-27
  • CSS3模擬實(shí)現(xiàn)一個(gè)雷達(dá)探測掃描動(dòng)畫特效(最新推薦)

    文章介紹了如何使用CSS3實(shí)現(xiàn)一個(gè)雷達(dá)探測掃描的效果,包括夜色背景、蜘蛛網(wǎng)盤、掃描體的轉(zhuǎn)動(dòng)效果、尾巴陰影以及被掃描到的光點(diǎn),通過HTML和CSS的配合,實(shí)現(xiàn)了豐富的動(dòng)畫效果,
    2025-02-21
  • css3 display:flex 彈性盒模型的使用方法

    CSS3的Flexbox是一種強(qiáng)大的布局模式,通過設(shè)置display:flex可以輕松實(shí)現(xiàn)對齊、排列和分布網(wǎng)頁元素,它解決了傳統(tǒng)布局方法中的對齊、間距分配和自適應(yīng)布局等問題,接下來通過本
    2025-02-19
  • css3 實(shí)現(xiàn)icon刷新轉(zhuǎn)動(dòng)效果

    本文給大家介紹css3 實(shí)現(xiàn)icon刷新轉(zhuǎn)動(dòng)效果,文章開頭給大家介紹了webkit-transform、animation、@keyframes這三個(gè)屬性,結(jié)合實(shí)例代碼給大家介紹的非常詳細(xì),感興趣的朋友一
    2025-02-19
  • CSS3動(dòng)態(tài)效果之過渡屬性(最新推薦)

    CSS3過渡屬性用于實(shí)現(xiàn)元素從一種樣式平滑過渡到另一種樣式,通過設(shè)置transition-property過渡屬性、transition-duration過渡時(shí)長transition-timing-function過渡函數(shù)和trans
    2025-02-19
  • CSS3實(shí)現(xiàn)動(dòng)態(tài)旋轉(zhuǎn)加載樣式的示例代碼

    本文介紹了如何使用CSS3創(chuàng)建一個(gè)簡單的動(dòng)態(tài)旋轉(zhuǎn)加載樣式,通過定義一個(gè)帶有類名“l(fā)oader”的HTML元素,并使用CSS樣式和@keyframes規(guī)則來實(shí)現(xiàn)旋轉(zhuǎn)動(dòng)畫,你可以根據(jù)需要調(diào)整樣式
    2025-02-19
  • 使用CSS3實(shí)現(xiàn)平滑的過渡動(dòng)畫效果(實(shí)例代碼)

    這篇文章主要介紹了如何使用CSS3的transition屬性實(shí)現(xiàn)平滑的過渡動(dòng)畫,本文通過實(shí)例代碼給大家介紹的非常詳細(xì),感興趣的朋友一起看看吧
    2025-02-13
  • CSS3中使用flex和grid實(shí)現(xiàn)等高元素布局的示例代碼

    本文介紹了使用CSS3中的Flexbox和Grid布局實(shí)現(xiàn)等高元素布局的方法,通過簡單的兩列實(shí)現(xiàn)、每行放置3列以及全部代碼的展示,展示了這兩種布局方式的實(shí)現(xiàn)細(xì)節(jié)和效果,感興趣的朋
    2025-02-11
  • 使用CSS3和SVG創(chuàng)建圓形進(jìn)度條動(dòng)畫效果

    CSS3和SVG的結(jié)合使用為網(wǎng)頁設(shè)計(jì)帶來了創(chuàng)新的動(dòng)態(tài)視覺效果,本文通過一個(gè)圓形進(jìn)度條的動(dòng)畫特效示例,展示了如何利用CSS3的動(dòng)畫功能和SVG的矢量圖形能力來創(chuàng)建豐富的用戶交互體
    2024-10-24

最新評論