0
我想向我的product.liquid
文件添加進度條。是否可以在shopify中通過腳本標籤加載引導
我正在通過使用內聯樣式的腳本標記來處理我的進度條。
var append='';
append +='<div style="'+divStyle+'"><center><p><span style="color: #000000;"><strong>HURRY! ONLY </strong>';
append +='<strong style="color: #ff0000;" id="left-item" class="left-item">'+ userVisit +'</strong><strong> LEFT IN STOCK.</strong></span></p><center>';
append +='<div style="background-color:#f5f5f5;border-radius:4px;box-shadow:0 1px 2px rgba(0, 0, 0, 0.1) inset;height:20px;margin-bottom:20px;overflow:hidden;" id="style1" class="progress">';
append +='<div style="width: '+ barWidth+'%;animation: 2s linear 0s normal none infinite running progress-bar-stripes;background-color: #D9534F;background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-size: 40px 40px;box-shadow: 0 -1px 0 rgba(0, 0, 0, 0.15) inset;color: #fff;float: left;font-size: 12px;height: 100%;line-height: 20px;text-align: center;transition: width 0.6s ease 0s;" aria-valuemax="'+ data['max_count']+'" aria-valuemin="'+ data['min_count']+'" aria-valuenow="'+ userVisit+'" role="progressbar" class="progress-bar progress-bar-danger progress-bar-striped active">';
append +='<span style="border: 0 none;clip: rect(0px, 0px, 0px, 0px);height: 1px;margin: -1px;overflow: hidden;padding: 0;position: absolute;width: 1px;" class="sr-only">80% Complete (danger)</span></div></div></div>';
$(document).find('.progressBar').append(append);
我想加載bootstrap給我的進度條更多的樣式。有沒有解決方案。