How to make a progress bar

后端 未结 19 1503
失恋的感觉
失恋的感觉 2020-12-04 18:09

How would one go about making a progress bar in html/css/javascript. I don\'t really want to use Flash. Something along the lines of what can be found here: http://dustincur

19条回答
  •  温柔的废话
    2020-12-04 18:46

    Here is my approach, i've tried to keep it slim:

    HTML:

    50%

    CSS:

    .load{    
        width: 50%;
        height: 12px;
        background: url( data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAALCAYAAAC+jufvAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAOwAAADsABataJCQAAABp0RVh0U29mdHdhcmUAUGFpbnQuTkVUIHYzLjUuMTAw9HKhAAAAPklEQVQYV2M48Gvvf4ZDv/b9Z9j7Fcha827Df4alr1b9Z1j4YsV/BuML3v8ZTC/7/GcwuwokrG4DCceH/v8Bs2Ef1StO/o0AAAAASUVORK5CYII=);  
        -moz-border-radius: 4px;
        border-radius: 4px;
    }
    
    .noload{
        width: 100px;    
        background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAALCAYAAAC+jufvAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAOwAAADsABataJCQAAABp0RVh0U29mdHdhcmUAUGFpbnQuTkVUIHYzLjUuMTAw9HKhAAAANUlEQVQYVy3EIQ4AQQgEwfn/zwghCMwGh8Tj+8yVKN0d2l00M6i70XsPmdmfu6OIQJmJqooPOu8mqi//WKcAAAAASUVORK5CYII=);     
        -moz-border-radius: 4px;
        border-radius: 4px;
        border: 1px solid #999999;    
        position: relative;
    }
    
    .loadtext {
        font-family: Consolas;    
        font-size: 11px;
        color: #000000;
        position: absolute;
        bottom: -1px;
    }
    

    Fiddle: here

    enter image description here

提交回复
热议问题