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

手把手教你用CSS實(shí)現(xiàn)帶箭頭的流程進(jìn)度條

  發(fā)布時(shí)間:2017-01-22 17:29:22   作者:佚名   我要評(píng)論
這篇文章主要給大家介紹了利用CSS實(shí)現(xiàn)帶箭頭的流程進(jìn)度條大方法,文中給出了詳細(xì)的示例代碼,對(duì)大家具有一定的參考價(jià)值,有需要的朋友們一起來(lái)看看吧。

本文介紹的是利用純CSS的帶箭頭流程進(jìn)度條,兼容到IE8,需要的朋友們下面來(lái)一起學(xué)習(xí)學(xué)習(xí)。

首先寫(xiě)出一個(gè)基本的樣式。

.cssNav li{  
    padding: 0px 20px;   
    line-height: 40px;  
    background: #50abe4;  
    display: inline-block;   
    color: #fff;  
    position: relative;  
}  

接下來(lái)使用 :after 偽類(lèi)畫(huà)出一個(gè)三角形,定位到右邊,如下:

.cssNav li:after{  
    content: '';  
    display: block;  
    border-top: 20px solid red;  
    border-bottom: 20px solid red;  
    border-left: 20px solid blue;  
    position: absolute;   
    rightright: -20px;   
    top: 0;  
}   

然后將after的顏色修改下,基本的雛形已經(jīng)看到了。

.cssNav li:after{  
    content: '';  
    display: block;  
    border-top: 20px solid transparent;  
    border-bottom: 20px solid transparent;  
    border-left: 20px solid #50abe4;  
    position: absolute;   
    rightright: -20px;   
    top: 0;  
    z-index: 10;  
}  

繼續(xù)使用 :before 偽類(lèi)來(lái)畫(huà)出左邊的三角形。如下:

.cssNav li:before{  
    content: '';  
    display: block;  
    border-top: 20px solid red;  
    border-bottom: 20px solid red;  
    border-left: 20px solid blue;  
    position: absolute;   
    left: 0px;   
    top: 0;  
} 

然后修改下before的顏色,并復(fù)制多個(gè)模塊看看。

最后把開(kāi)頭和結(jié)尾的稍微修飾一下。

.cssNav li:first-child{    
    border-radius: 4px 0 0 4px;    
    padding-left: 25px;  
}    
.cssNav li:last-child,.cssNavEnd{    
    border-radius: 0px 4px 4px 0px;    
    padding-right: 25px;  
}    
.cssNav li:first-child:before{    
    display: none;    
}    
.cssNav li:last-child:after,.cssNavEnd:after{    
    display: none;    
} 

加上選中狀態(tài),大功告成。

.cssNav li.active {  
    background-color: #ef72b6;  
}  
.cssNav li.active:after {  
    border-left-color: #ef72b6;  
} 

總結(jié)

以上就是這篇文章的全部?jī)?nèi)容了,希望本文的內(nèi)容對(duì)大家的學(xué)習(xí)或者工作能帶來(lái)一定的幫助,如果有疑問(wèn)大家可以留言交流。

相關(guān)文章

最新評(píng)論