2016-02-04 18 views
0

我真的很需要你的幫助......如何使引導程序進度條從左到右突出顯示效果?

我需要創建效果引導進度條會像它載入中...

我不喜歡引導條紋效果中..

我想要一個從左至右突出顯示的光效。

在這裏我做了什麼現在:

<link rel="stylesheet" href="/bootstrap/css/bootstrap.min.css"> 

     <script type="text/javascript" src="/bootstrap/js/jquery-1.12.0.min.js"></script> 
     <script type="text/javascript" src="/bootstrap/js/bootstrap.min.js"></script> 
     <style> 

      .progress-bar.active, .progress.active .progress-bar { 
      animation: reverse progress-bar-stripes 1s linear infinite; 
     } 

     .progress-bar-striped, .progress-striped .progress-bar { 

      background-image: -webkit-linear-gradient(90deg,rgba(255,255,255,1) 50%,transparent 25%,transparent 100%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 100%,transparent); 
      background-image: linear-gradient(80deg,rgba(255,255,255,.5) 60%,transparent 25%,transparent 50%,rgba(255,255,255,1) 50%,rgba(255,255,255,1) 75%,transparent 75%,transparent); 
      background-image: linear-gradient(90deg,rgba(255,255,255,.5) 15%,transparent 5%,transparent 10%,rgba(255,255,255,.3) 50%,rgba(255,255,255,.5) 95%,transparent 80%,transparent); 
      background-image: #fff; 
      background-size:100% 100%; 




     } 
     .progress-bar-gold { 
      background-color: #f9e467; /* For browsers that do not support gradients */ 
      background-color: -webkit-linear-gradient(#f9e467,#fdf4b5, #cb871b); /* For Safari 5.1 to 6.0 */ 
      background-color: -o-linear-gradient(#f9e467,#fdf4b5, #cb871b); /* For Opera 11.1 to 12.0 */ 
      background-color: -moz-linear-gradient(#f9e467,#fdf4b5, #cb871b); /* For Firefox 3.6 to 15 */ 
      background-color: linear-gradient(#f9e467,#fdf4b5, #cb871b); /* Standard syntax */ 
     } 


     </style> 
    <div class="progress"> 
     <div class="progress-bar progress-bar-gold progress-bar-striped active" role="progressbar" aria-valuenow="100" aria-valuemin="50" aria-valuemax="100" style="width:50%"> 
     40% 
     </div> 
    </div> 
+0

試試這個http://www.w3schools.com/bootstrap/tryit.asp?filename=trybs_progressbar3&stacked=h –

+0

沒有不那樣...我想更換bootstrap進度條帶活動效果.. 這是靜態的...沒有動畫發生... – POGI

+0

這是https://css-tricks.com/examples/ProgressBars/? –

回答

0

看到這個小提琴: https://jsfiddle.net/4s749o36/1/

HTML:

<script src="https://code.jquery.com/jquery-2.2.0.min.js"></script> 
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet"> 
<div class="progress"> 
    <div class="progress-bar progress-bar-striped active" role="progressbar" aria-valuenow="45" origWidth="250px" aria-valuemin="0" aria-valuemax="100" style="width: 0px" id="myprogress"> 
    <span class="sr-only">45% Complete</span> 
    </div> 
</div> 

的jQuery:

$(function() { 
    var newWidth = $("#myprogress").attr("origWidth"); 
    $("#myprogress").animate({ 
         width: newWidth 
        }, 1200); 
}); 
+0

感謝您的時間來回答。 加載效果很好,但我需要將條紋加載效果更改爲光線效果... 這就像您從進度條的左側指向FLASHLIGHT ...類似的東西... 我希望你明白我的意思... – POGI

+0

試試這個更新的答案 –