bl双性强迫侵犯h_国产在线观看人成激情视频_蜜芽188_被诱拐的少孩全彩啪啪漫画

CSS中如何實(shí)現(xiàn)自適應(yīng)導(dǎo)航菜單

小編給大家分享一下CSS中如何實(shí)現(xiàn)自適應(yīng)導(dǎo)航菜單,希望大家閱讀完這篇文章之后都有所收獲,下面讓我們一起去探討吧!

創(chuàng)新互聯(lián)公司長期為上千余家客戶提供的網(wǎng)站建設(shè)服務(wù),團(tuán)隊(duì)從業(yè)經(jīng)驗(yàn)10年,關(guān)注不同地域、不同群體,并針對(duì)不同對(duì)象提供差異化的產(chǎn)品和服務(wù);打造開放共贏平臺(tái),與合作伙伴共同營造健康的互聯(lián)網(wǎng)生態(tài)環(huán)境。為鶴山企業(yè)提供專業(yè)的網(wǎng)站制作、網(wǎng)站設(shè)計(jì),鶴山網(wǎng)站改版等技術(shù)服務(wù)。擁有十多年豐富建站經(jīng)驗(yàn)和眾多成功案例,為您定制開發(fā)。

html

 <nav class="nav">
        <ul>
            <li class="current"><a href="#">Portfolio</a></li>
            <li><a href="#">Illustration</a></li>
            <li><a href="#">Web Design</a></li>
            <li><a href="#">Print Media</a></li>
            <li><a href="#">Graphic Design</a></li>
        </ul>
    </nav>

css

 .nav {
            position: relative;
            margin: 20px 0;
        }

            .nav ul {
                margin: 0;
                padding: 0;
            }

                .nav ul li {
                    margin: 0 5px 10px 0;
                    padding: 0;
                    list-style: none;
                    float: left;
                }

            .nav a {
                padding: 3px 12px;
                text-decoration: none;
                color: #999;
                line-height: 100%;
            }

                .nav a:hover {
                    color: #000;
                }

            .nav .current a {
                background: #999;
                color: #fff;
                border-radius: 5px;
            }
            /* right nav */
            .nav.right ul {
                text-align: right;
            }

            /* center nav */
            .nav.center ul {
                text-align: center;
            }

頁面小于600顯示成一列

@media (max-width: 600px) {
            .nav {
                position: relative;
                min-height: 30px;
            }

                .nav ul {
                    width: 180px;
                    padding: 5px 0;
                    position: absolute;
                    top: 0;
                    left: 0;
                    border: solid 1px #aaa;
                    background: #fff url(images/icon-menu.png) no-repeat 10px 11px;
                    border-radius: 5px;
                    box-shadow: 0 1px 2px rgba(0,0,0,.3);
                }

                .nav li {
                    display: none; /* hide all <li> items */
                    margin: 0;
                }

                .nav .current {
                    display: block; /* show only current <li> item */
                }

                .nav a {
                    display: block;
                    padding: 5px 5px 5px 32px;
                    text-align: left;
                }

                .nav .current a {
                    background: none;
                    color: #666;
                }

                /* on nav hover */
                .nav ul:hover {
                    background-image: none;
                }

                    .nav ul:hover li {
                        display: block;
                        margin: 0 0 5px;
                    }

                    .nav ul:hover .current {
                        background: url(images/icon-check.png) no-repeat 10px 7px;
                    }

                /* right nav */
                .nav.right ul {
                    left: auto;
                    right: 0;
                }

                /* center nav */
                .nav.center ul {
                    left: 50%;
                    margin-left: -90px;
                }
        }

看完了這篇文章,相信你對(duì)“CSS中如何實(shí)現(xiàn)自適應(yīng)導(dǎo)航菜單”有了一定的了解,如果想了解更多相關(guān)知識(shí),歡迎關(guān)注創(chuàng)新互聯(lián)行業(yè)資訊頻道,感謝各位的閱讀!

本文題目:CSS中如何實(shí)現(xiàn)自適應(yīng)導(dǎo)航菜單
路徑分享:http://vcdvsql.cn/article40/gjijho.html

成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供建站公司微信公眾號(hào)自適應(yīng)網(wǎng)站網(wǎng)站設(shè)計(jì)全網(wǎng)營銷推廣App開發(fā)

廣告

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

外貿(mào)網(wǎng)站制作