Learn on my own
Firemonkey Delphi XE VCL FMX Programmig pascal tutorial
Beranda
Download
Senin, 04 September 2023
Progress Bars HTML CSS
Progress Bars
Progress Bars (1)
Progress Bars (2)
Progress Bars (3)
Progress Bars (4)
1
2
3
4
Reset
HTML
CSS
Javascript
Progress Bars
Progress Bars (1)
Progress Bars (2)
Progress Bars (3)
Progress Bars (4)
1
2
3
4
Reset
* { box-sizing: border-box; } #Group { background: #333; text-align: center; color: #eee; font-family: system-ui, sans-serif; padding: 10px 0; } .PB { box-sizing: content-box; height: 20px; /* Can be anything */ position: relative; margin: 20px; /* Just for demo spacing */ background: #555; border-radius: 25px; padding: 10px; box-shadow: inset 0 -1px 1px rgba(255, 255, 255, 0.3); } .PB span { display: block; height: 100%; width: 0; border-top-right-radius: 8px; border-bottom-right-radius: 8px; border-top-left-radius: 20px; border-bottom-left-radius: 20px; background-color: rgb(43, 194, 83); background-image: linear-gradient( center bottom, rgb(43, 194, 83) 37%, rgb(84, 240, 84) 69% ); box-shadow: inset 0 2px 9px rgba(255, 255, 255, 0.3), inset 0 -2px 6px rgba(0, 0, 0, 0.4); position: relative; overflow: hidden; text-align: left; color: #000; } .PB span:after { content: ""; position: absolute; top: 0; left: 0; bottom: 0; right: 0; background-image: linear-gradient( -45deg, rgba(255, 255, 255, 0.2) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.2) 50%, rgba(255, 255, 255, 0.2) 75%, transparent 75%, transparent ); z-index: 1; background-size: 50px 50px; animation: move 2s linear infinite; border-top-right-radius: 8px; border-bottom-right-radius: 8px; border-top-left-radius: 20px; border-bottom-left-radius: 20px; overflow: hidden; } .Judul { margin: 0; position: absolute; top: 50%; left: 50%; -ms-transform: translate(-50%, -50%); transform: translate(-50%, -50%); } .orange span { background-image: linear-gradient(#f1a165, #f36d0a); } .red span { background-image: linear-gradient(#f0a3a3, #f42323); } .blue span { background-image: linear-gradient(#8080ff, #1a1aff); } .noanimate span, .noanimate span::after { background-image: none; } @keyframes move { 0% { background-position: 0 0; } 100% { background-position: 50px 50px; } } .Btns { display: inline-block; border: 1px solid white ; padding: 10px 20px; margin: 5px; font weight: 800; cursor: pointer; } .Btns:hover { background-color: #f1f1f1; color: #000; } .Btns:active { box-shadow: 0 0 10px yellow; background-color: transparent; border-color: yellow; color: lime; }
var [ P1, P2, P3, P4, J ] = [0,0,0,0,0]; var H ; $('#B1').click(function(){ P1++; PBdraw(1); }); $('#B2').click(function(){ P2++; PBdraw(1); }); $('#B3').click(function(){ P3++; PBdraw(1); }); $('#B4').click(function(){ P4++; PBdraw(1); }); $('#BR').click(function(){ [ P1, P2, P3, P4, J ] = [0,0,0,0,0]; $('.PB span').css('width', '0'); }); function PBdraw(X){ J+= X; H = Math.round(P1/J*100); $('#PB1').css('width', H+'%'); $('#PB1').html(' '+H+'%'); H = Math.round(P2/J*100); $('#PB2').css('width', H+'%'); $('#PB2').html(' '+H+'%'); H = Math.round(P3/J*100); $('#PB3').css('width', H+'%'); $('#PB3').html(' '+H+'%'); H = Math.round(P4/J*100); $('#PB4').css('width', H+'%'); $('#PB4').html(' '+H+'%'); }
Silahkan share untuk menambah manfaat.
Semoga bermanfaat,
Postingan Lama
Beranda
Langganan:
Komentar (Atom)
Baru Tayang
Your browser does not support