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

CSS3制作彩色進(jìn)度條樣式的代碼示例分享

rainleaves   發(fā)布時(shí)間:2016-06-23 12:15:04   作者:雨打浮萍   我要評(píng)論
用CSS3的border-radius、box-shadow、transition、-moz-linear-gradient、-webkit-gradient等樣式就可以完成一個(gè)時(shí)尚進(jìn)度條,這里我們來看幾個(gè)CSS3制作彩色進(jìn)度條樣式的代碼示例分享:

一、制作靜態(tài)的紫色條紋進(jìn)度條
html代碼:

XML/HTML Code復(fù)制內(nèi)容到剪貼板
  1. <body>  
  2. <div class="progress-bar purple"> <span style="width:40%;"></span> </div>  
  3. </body>  

css代碼:

CSS Code復(fù)制內(nèi)容到剪貼板
  1. body {   
  2.  background-color:#333;   
  3. }   
  4. .progress-bar {   
  5.  background-color:#222;   
  6.  border-radius:3px;   
  7.  width:300px;   
  8.  height:24px;   
  9.  padding:5px;   
  10.  margin:50px;   
  11.  border-bottom:1px solid #444;   
  12.  box-shadow:inset 0 0 2px 0 #000;   
  13. }   
  14. .progress-bar span {   
  15.  display:inline-block;   
  16.  width:140px;   
  17.  height:24px;   
  18.         border-radius:2px;   
  19.  box-shadow:0 1px 0 rgba(255, 255, 255, 0.5) inset;   
  20.  -moz-box-shadow:0 1px 0 rgba(255, 255, 255, 0.5) inset;   
  21.  -webkit-box-shadow:rgba(255,255,255,0.5) 0 1px 0 inset;   
  22. }   
  23. .purple span{   
  24.  background-color:#F09;   
  25.  background-image:-moz-linear-gradient(45deg, rgba(255, 255, 255, 0.3) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.3) 50%, rgba(255, 255, 255, 0.3) 75%, transparent 75%);   
  26.  background-image:-webkit-gradient(linear,0 100%,100% 0,color-stop(25%,rgba(255,255,255,0.3)),color-stop(25%,transparent),color-stop(50%,transparent),color-stop(50%,rgba(255,255,255,0.3)),color-stop(75%,rgba(255,255,255,0.3)),color-stop(75%,transparent));   
  27.  background-size:16px 16px;   
  28. }  

最終效果如下圖所示:
2016623121249918.jpg (340×70)

二、制作靜態(tài)的藍(lán)色進(jìn)度條
html代碼:

XML/HTML Code復(fù)制內(nèi)容到剪貼板
  1. <div class="progress-bar orange"> <span style="width:60%;"></span> </div>  

css代碼:

CSS Code復(fù)制內(nèi)容到剪貼板
  1. .orange span{   
  2.  background-image:-webkit-gradient(linear,0% 0%,0% 100%,from(#fecd22),to(#fd9415));   
  3.  background-image:-moz-linear-gradient(-90deg,#fecd22,#fd9415);   
  4. }  

最終效果如下圖所示:
2016623121331800.jpg (330×50)

三、制作靜態(tài)的綠色進(jìn)度條
html代碼:

XML/HTML Code復(fù)制內(nèi)容到剪貼板
  1. <div> <span style="width:80%;"></span> </div>  

css代碼:

CSS Code復(fù)制內(nèi)容到剪貼板
  1. .green span{   
  2.  background-color:#00ff24;   
  3.  box-shadow:rgba(255,255,255,0.7)0 5px 5px inser,rgba(255,255,255,0.7)0 -5px 5px inset;   
  4.  -webkit-box-shadow:rgba(255, 255, 255, 0.7) 0 5px 5px inset, rgba(255, 255, 255, 0.7) 0 -5px 5px inset;   
  5.  -moz-box-shadow:rgba(255, 255, 255, 0.7) 0 5px 5px inset, rgba(255, 255, 255, 0.7) 0 -5px 5px inset;   
  6. }  

最終效果如下圖所示:
2016623121411191.jpg (325×43)

四、為紫色條紋添加動(dòng)態(tài)效果
css代碼:

CSS Code復(fù)制內(nèi)容到剪貼板
  1. .purple span:hover{   
  2.  -webkit-animation:animate-stripes 3s linear infinite;   
  3.  -moz-animation:3s linear 0s normal none infinite animate-stripes;   
  4. }   
  5. @-webkit-keyframes animate-stripes {   
  6. 0% {background-position: 0 0;} 100% {background-position60px 0;}   
  7. }   
  8. @-moz-keyframes animate-stripes {   
  9. 0% {background-position: 0 0;} 100% {background-position60px 0;}   
  10. }  

鼠標(biāo)放上去之后,動(dòng)態(tài)效果會(huì)出現(xiàn)。

相關(guān)文章

最新評(píng)論