很炫的CSS3導航效果(會動的哦^_^)

來源:互聯網
上載者:User

標籤:style   http   io   ar   color   os   sp   for   on   

今天瀏覽網頁,看到個很不錯的效果(本人不會配色,估計色彩搭配好點效果更佳),想了想,就把它彷過來了。雖然現在IE對CSS3特效的支援是個很糾結的事情,但是我們更應該看到CSS3在一些進階瀏覽器中的突出表現,所以讓我們忍受IE生硬的同時,感受進階瀏覽器的平滑。 

效果預覽:http://www.huiyi8.com/css3/  <!DOCTYPE HTML> <html><head><meta charset="utf-8"><title>很炫的導航</title><style>.nav{    margin:0 auto;    width:800px;    height:200px;}.nav .links{    float:left;    position:relative;    width:200px;    height:200px;    overflow:hidden;    -moz-transition:background-color .3s ease-in-out;    -webkit-transition:background-color .3s ease-in-out;    -o-transition:background-color .3s ease-in-out;    -ms-transition:background-color .3s ease-in-out;    transition:background-color .3s ease-in-out;}.nav .links1{background-color:#949494;}.nav .links2{background-color:#a4a4a4;}.nav .links3{background-color:#b4b4b4;}.nav .links4{background-color:#c4c4c4;}.nav .links .bg{    position:absolute;    top:-200px;    width:200px;    height:200px;    opacity:0;    filter:Alpha(opacity=0);    background:url(imgs/img_01.png) no-repeat;    filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src=‘imgs/img_01.png‘,sizingMethod=‘crop‘);    -moz-transition:top .3s ease-in-out,opacity .5s ease-in-out;    -webkit-transition:top .3s ease-in-out,opacity .5s ease-in-out;    -o-transition:top .3s ease-in-out,opacity .5s ease-in-out;    -ms-transition:top .3s ease-in-out,opacity .5s ease-in-out;    transition:top .3s ease-in-out,opacity .5s ease-in-out;}.nav .links .intro{    position:absolute;    left:0;    top:50%;    margin-top:-24px;    width:100%;    line-height:48px;    font:48px/1 Tahoma,Impact,Arial;    color:#fff;    text-align:center;    -moz-transition:top .3s ease-in-out,color .3s ease-in-out;    -webkit-transition:top .3s ease-in-out,color .3s ease-in-out;    -o-transition:top .3s ease-in-out,color .3s ease-in-out;    -ms-transition:top .3s ease-in-out,color .3s ease-in-out;    transition:top .3s ease-in-out,color .3s ease-in-out;}.nav .links:hover{background-color:#383838;}.nav .links:hover .bg{top:-100px;opacity:0.8;filter:Alpha(opacity=80);}.nav .links:hover .intro{top:70%;color:#f66;}</style></head><body><div class="nav">    <a href="#" target="_blank" class="links links1">        <span class="intro">Index</span>        <span class="bg"></span>    </a>    <a href="#" target="_blank" class="links links2">        <span class="intro">Article</span>        <span class="bg"></span>    </a>    <a href="#" target="_blank" class="links links3">        <span class="intro">Photos</span>        <span class="bg"></span>    </a>    <a href="#" target="_blank" class="links links4">        <span class="intro">Contact</span>        <span class="bg"></span>    </a></div></body></html>

很炫的CSS3導航效果(會動的哦^_^)

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.