Progress Bar with HTML and CSS

前端 未结 15 1106
耶瑟儿~
耶瑟儿~ 2020-12-02 05:13

I want to create a progress bar like in the below image:

\"Progress

I have no idea about

15条回答
  •  再見小時候
    2020-12-02 05:30

    I like this one:

    • Article
    • Demo
    • Downloads

    very slick with only this as HTML and the rest CSS3 that is backwards compatible (although it will have less eyecandy)

    Edit Added code below, but taken directly from the page above, all credit to that author

    .meter {
      height: 20px;
      /* Can be anything */
      position: relative;
      background: #555;
      -moz-border-radius: 25px;
      -webkit-border-radius: 25px;
      border-radius: 25px;
      padding: 10px;
      -webkit-box-shadow: inset 0 -1px 1px rgba(255, 255, 255, 0.3);
      -moz-box-shadow: inset 0 -1px 1px rgba(255, 255, 255, 0.3);
      box-shadow: inset 0 -1px 1px rgba(255, 255, 255, 0.3);
    }
    
    .meter>span {
      display: block;
      height: 100%;
      -webkit-border-top-right-radius: 8px;
      -webkit-border-bottom-right-radius: 8px;
      -moz-border-radius-topright: 8px;
      -moz-border-radius-bottomright: 8px;
      border-top-right-radius: 8px;
      border-bottom-right-radius: 8px;
      -webkit-border-top-left-radius: 20px;
      -webkit-border-bottom-left-radius: 20px;
      -moz-border-radius-topleft: 20px;
      -moz-border-radius-bottomleft: 20px;
      border-top-left-radius: 20px;
      border-bottom-left-radius: 20px;
      background-color: #f1a165;
      background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0, #f1a165), color-stop(1, #f36d0a));
      background-image: -webkit-linear-gradient(top, #f1a165, #f36d0a);
      background-image: -moz-linear-gradient(top, #f1a165, #f36d0a);
      background-image: -ms-linear-gradient(top, #f1a165, #f36d0a);
      background-image: -o-linear-gradient(top, #f1a165, #f36d0a);
      -webkit-box-shadow: inset 0 2px 9px rgba(255, 255, 255, 0.3), inset 0 -2px 6px rgba(0, 0, 0, 0.4);
      -moz-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;
    }

提交回复
热议问题