Konuyu Oyla:
  • Toplam: 0 Oy - Ortalama: 0
  • 1
  • 2
  • 3
  • 4
  • 5
Günlük paylaşım ilerlemesi çubuğu
#1
İstediğiniz şablona ekleyin:
Kod:
<table class="tborder" cellspacing="0" cellpadding="5">
<tbody>
<tr>
<td class="thead" align="left">Daily Post Goal</td> </tr>
<tr>
<td class="trow1">
<span style="color:#9DAAAA">Posts:</span><span style="float:right;color: #9DAAAA;"> {$fetch}/{$postgoal}</span>
</td>
</tr>
<tr>
<td class="trow1">
<span style="color:#9DAAAA">Status:</span><if $fetch >= $postgoal then><span style="color: #00BF00;float:right;">Reached</span><else> <span style="color: #e03131;float:right;">Not Reached</span></if>
</td>
</tr>
<tr>
<td class="trow1">
<div class="prog-bar-border">
<div id="progress_bar" class="prog-bar-haxzz">
   <span id="prog-count" style="width: 0%"></span>
   <p id="prog-percent">0%</p>
</div></div>
</td> </tr> </td> </tr> </tbody> </table>

<script>
function setProgress(i){
var y = Math.round( i );
$('#prog-percent').html(y+'%');
var red = 0, green = 0;
if (i >= 80) {
       red = 137 - Math.round(((i - 137) / 34) * 34);
       green = 34;
   } else if (i >= 60) {
       red = 137;
       green = Math.round(((i - 137) /34) * 34);
   } else {
       red = 137;
       green = 34;
   }
$('#prog-count').css('background', "rgb(" + red + "," + green + ",34)");
if (i > 70){
$('#prog-percent').css('color', 'white');
} else {
$('#prog-percent').css('color', '#fff');
}
$('#prog-count').width(i+'%');
}
(function() {
var i = 0;
var n = "{$fetch}";
var o = parseInt(n.replace(',', ''));
var p = {$postgoal};
i = (o/p)*100;
if (i > 100) i = 100;
if (i < 0) i = 0;
setProgress(i);
})();
</script>



Global.css'e ekleyin:
Kod:
.prog-bar-border {
   background: #202020;
   position: relative;
   display: block;
   vertical-align: middle;
   height: 100%;
   border-radius: 1px;
   line-height: 30px;
   overflow: hidden;
}

.prog-bar-haxzz {
   background: #202020;
   width: 100%;
   color: white;
   position: relative;
   display: block;
   text-align: center;
   vertical-align: middle;
   height: 100%;
   border-radius: 6px;
   line-height: 27px;
   overflow: hidden;
}

.prog-bar-haxzz>span {
   position: absolute;
   display: block;
   top: 0;
   left: 0;
   bottom: 0;
   border-radius: 1px;
   background: rgba(82,82,82,0.8);
}

.prog-bar-haxzz>p {
   font-weight: 500;
   display: inline;
   position: relative;
   z-index: 1;
}


Sonuç:
687474703a2f2f692e696d6775722e636f6d2f6d...6d2e706e67
Cevapla PGM
Teşekkür verenler:
#2
HTML'le Progress Bar ile yapılabilecekken CSS'le yapılmasına anlam veremedim. (Class'lardan bahsetmiyorum konusunu açıcam şimdi)
Ara
Cevapla PGM
Teşekkür verenler:
#3
Teşekkürler :3
Cevapla PGM
Teşekkür verenler:
#4
Güzel.
Denetleme Ekibi Lideri: 22-06-2018 -  ....
Ara
Cevapla PGM
Teşekkür verenler:


Hızlı Menü:


Şu anda bu konuyu okuyanlar: 1 Ziyaretçi



Reklam yaziniz bostur. ayarlardan duzenleyiniz:medi -

Online Shopping App
Online Shopping - E-Commerce Platform
Online Shopping - E-Commerce Platform
Feinunze Schmuck Jewelery Online Shopping