内射老阿姨1区2区3区4区_久久精品人人做人人爽电影蜜月_久久国产精品亚洲77777_99精品又大又爽又粗少妇毛片

純CSS3如何實(shí)現(xiàn)單頁(yè)切換導(dǎo)航菜單

這篇文章主要為大家展示了“純CSS3如何實(shí)現(xiàn)單頁(yè)切換導(dǎo)航菜單”,內(nèi)容簡(jiǎn)而易懂,條理清晰,希望能夠幫助大家解決疑惑,下面讓小編帶領(lǐng)大家一起研究并學(xué)習(xí)一下“純CSS3如何實(shí)現(xiàn)單頁(yè)切換導(dǎo)航菜單”這篇文章吧。

10多年的渾源網(wǎng)站建設(shè)經(jīng)驗(yàn),針對(duì)設(shè)計(jì)、前端、開(kāi)發(fā)、售后、文案、推廣等六對(duì)一服務(wù),響應(yīng)快,48小時(shí)及時(shí)工作處理。全網(wǎng)營(yíng)銷(xiāo)推廣的優(yōu)勢(shì)是能夠根據(jù)用戶(hù)設(shè)備顯示端的尺寸不同,自動(dòng)調(diào)整渾源建站的顯示方式,使網(wǎng)站能夠適用不同顯示終端,在瀏覽器中調(diào)整網(wǎng)站的寬度,無(wú)論在任何一種瀏覽器上瀏覽網(wǎng)站,都能展現(xiàn)優(yōu)雅布局與設(shè)計(jì),從而大程度地提升瀏覽體驗(yàn)。創(chuàng)新互聯(lián)建站從事“渾源網(wǎng)站設(shè)計(jì)”,“渾源網(wǎng)站推廣”以來(lái),每個(gè)客戶(hù)項(xiàng)目都認(rèn)真落實(shí)執(zhí)行。

這是一款使用純CSS3制作的單頁(yè)切換導(dǎo)航菜單界面設(shè)計(jì)效果。該頁(yè)面效果中,在頁(yè)面的左側(cè)垂直排放一組導(dǎo)航按鈕,當(dāng)點(diǎn)擊導(dǎo)航按鈕時(shí),相應(yīng)的頁(yè)面會(huì)從屏幕右側(cè)滑動(dòng)出來(lái),效果非常炫酷。

純CSS3如何實(shí)現(xiàn)單頁(yè)切換導(dǎo)航菜單

 使用方法

 HTML結(jié)構(gòu)

該單頁(yè)切換導(dǎo)航菜單界面的HTML結(jié)構(gòu)如下:

<div class="ct" id="t1">  
  <div class="ct" id="t2">  
    <div class="ct" id="t3">  
      <div class="ct" id="t4">  
         <div class="ct" id="t5">  
          <ul id="menu">  
            <a href="#t1"><li class="icon fa fa-bolt" id="uno"></li></a>  
            <a href="#t2"><li class="icon fa fa-keyboard-o" id="dos"></li></a>  
            <a href="#t3"><li class="icon fa fa-rocket" id="tres"></li></a>  
            <a href="#t4"><li class="icon fa fa-dribbble" id="cuatro"></li></a>  
            <a href="#t5"><li class="icon fa fa-plus-circle" id="cinco"></li></a>  
          </ul>  
          <div class="page" id="p1">  
             <section class="icon fa fa-bolt"><span class="title">Bolt</span><span class="hint">...</section>     
          </div>  
          <div class="page" id="p2">  
            <section class="icon fa fa-keyboard-o"><span class="title">Type</span></section>  
          </div>     
          <div class="page" id="p3">  
            <section class="icon fa fa-rocket"><span class="title">Rocket</span></section>  
          </div>  
          <div class="page" id="p4">  
            <section class="icon fa fa-dribbble">  
              <span class="title">Dribbble</span>  
              <p class="hint">  
                Im ready to play, <span class="hint line-trough">invite me </span> find me   
              </p>  
              <p class="hint">...</p>  
            </section>  
          </div>    
          <div class="page" id="p5">  
            <section class="icon fa fa-plus-circle">  
              <span class="title">More</span>  
              <p class="hint">  
                ...   
              </p>  
            </section>  
          </div>    
        </div>  
      </div>  
    </div>  
  </div>  
</div>

CSS樣式

該單頁(yè)切換導(dǎo)航菜單界面使用transform和transition來(lái)制作頁(yè)面的切換動(dòng)畫(huà)效果。并通過(guò):target偽元素來(lái)完成按鈕點(diǎn)擊時(shí)的頁(yè)面切換。完整的CSS代碼如下,代碼中沒(méi)有添加瀏覽器廠商的前綴。

html, body, .page {   
  width: 100%;   
  height: 100%;   
  margin: 0;   
  padding: 0;   
  transition: all .6s cubic-bezier(.5, .2, .2, 1.1);   
  color: #fff;   
  overflow: hidden;    
}   
    
* {   
  font-family: 'open sans', 'lato', 'helvetica', sans-serif;   
}   
    
.page {   
  position: absolute;   
}   
    
#p1 {   
  left: 0;   
}   
    
#p2, #p3, #p4, #p5 {   
  left: 200%;   
}   
    
#p1 { background: darkslateblue; }   
#p2 { background: tomato; }   
#p3 { background: gold; }   
#p4 { background: deeppink; }   
#p5 { background: #9b59b6; }   
    
#t2:target #p2,   
#t3:target #p3,   
#t4:target #p4,   
#t5:target #p5 {   
  transform: translateX(-190%);   
  transition-delay: .4s !important;   
}   
    
#t2:target #p1,    
#t3:target #p1,   
#t4:target #p1,   
#t5:target #p1{   
  background: black;   
}   
    
#t2:target #p1 .icon,    
#t3:target #p1 .icon,   
#t4:target #p1 .icon,   
#t5:target #p1 .icon {   
  -webkit-filter: blur(3px);   
  filter: blur(3px);   
}   
    
.icon {   
  color: #fff;   
  font-size: 32px;   
  display: block;   
}   
    
ul .icon:hover {   
  opacity: 0.5;   
}   
    
.page .icon .title {   
  line-height: 2;   
}   
    
#t2:target ul .icon,   
#t3:target ul .icon,   
#t4:target ul .icon,   
#t5:target ul .icon{   
  transform: scale(.6);   
  transition-delay: .25s;   
}   
    
#t2:target #dos,   
#t3:target #tres,   
#t4:target #cuatro,   
#t4:target #cinco {   
  transform: scale(1.2) !important;   
}   
    
ul {   
  position: fixed;   
  z-index: 1;   
  top: 0;   
  bottombottom: 0;   
  left: 0;   
  margin: auto;   
  height: 280px;   
  width: 10%;   
  padding: 0;   
  text-align: center;   
 }   
    
#menu .icon {   
  margin: 30px 0;   
  transition: all .5s ease-out !important;   
}   
    
a {   
  text-decoration: none;   
}   
    
.title, .hint {   
  display: block;   
}   
    
.title {   
  font-size: 38px;   
}   
    
.hint {   
  font-size: 13px;   
}   
    
#p4 .hint {   
  display: inherit !important;   
}   
    
.hint a {   
  color: yellow;   
  transition: all 250ms ease-out;   
}   
    
.hint a:hover {   
  color: #FFF;   
}   
    
.line-trough {   
  text-decoration: line-through;   
}   
    
.page .icon {   
  position: absolute;   
  top: 0;   
  bottombottom: 0;   
  rightright: 10%;   
  left: 0;   
  width: 270px;   
  height: 170px;   
  margin: auto;   
  text-align: center;   
  font-size: 80px;   
  line-height: 1.3;   
  transform: translateX(360%);   
  transition: all .5s cubic-bezier(.25, 1, .5, 1.25);   
}   
    
.page#p1 .icon {   
  height: 220px;   
}   
    
.page#p1 .icon {   
  transform: translateX(10%) !important;   
}   
    
#t2:target .page#p2 .icon,   
#t3:target .page#p3 .icon,   
#t4:target .page#p4 .icon,   
#t5:target .page#p5 .icon {   
  transform: translateX(0) !important;   
  transition-delay: 1s;   
}

以上是“純CSS3如何實(shí)現(xiàn)單頁(yè)切換導(dǎo)航菜單”這篇文章的所有內(nèi)容,感謝各位的閱讀!相信大家都有了一定的了解,希望分享的內(nèi)容對(duì)大家有所幫助,如果還想學(xué)習(xí)更多知識(shí),歡迎關(guān)注創(chuàng)新互聯(lián)行業(yè)資訊頻道!

網(wǎng)頁(yè)名稱(chēng):純CSS3如何實(shí)現(xiàn)單頁(yè)切換導(dǎo)航菜單
URL地址:http://www.rwnh.cn/article32/pcodpc.html

成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供建站公司、用戶(hù)體驗(yàn)外貿(mào)網(wǎng)站建設(shè)、網(wǎng)站營(yíng)銷(xiāo)、商城網(wǎng)站、小程序開(kāi)發(fā)

廣告

聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶(hù)投稿、用戶(hù)轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請(qǐng)盡快告知,我們將會(huì)在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如需處理請(qǐng)聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來(lái)源: 創(chuàng)新互聯(lián)

成都seo排名網(wǎng)站優(yōu)化
寿阳县| 安福县| 白水县| 乳山市| 镶黄旗| 和平区| 山东省| 宁远县| 怀化市| 霍山县| 新建县| 德惠市| 称多县| 石屏县| 惠来县| 黄陵县| 连江县| 武清区| 宣城市| 孟村| 彭泽县| 外汇| 台中市| 佛山市| 鲁山县| 屯门区| 汽车| 文山县| 湛江市| 宁晋县| 正安县| 牙克石市| 淮阳县| 如东县| 新沂市| 和田县| 康平县| 荣昌县| 兰西县| 隆林| 乌审旗|