Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/84.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Html/CSS中可自定义的进度条_Html_Css_Progress Bar - Fatal编程技术网

Html/CSS中可自定义的进度条

Html/CSS中可自定义的进度条,html,css,progress-bar,Html,Css,Progress Bar,我想用HTML和CSS创建一个进度条,如下所示。不知道怎么做。有什么帮助吗 你有谷歌,搜索答案的时间会少一些。。 或 我可以帮你。我能找到的最好的 <style type="text/css"> #layer1 { -moz-animation-delay:0.5s; -webkit-animation-delay:0.5s; } #layer2 { -moz-animation-delay:1s; -webkit-animation-delay:1s; } #layer3 { -

我想用HTML和CSS创建一个进度条,如下所示。不知道怎么做。有什么帮助吗


你有谷歌,搜索答案的时间会少一些。。 或 我可以帮你。

我能找到的最好的

<style type="text/css">

#layer1 { -moz-animation-delay:0.5s; -webkit-animation-delay:0.5s; }
#layer2 { -moz-animation-delay:1s; -webkit-animation-delay:1s; }
#layer3 { -moz-animation-delay:1.5s; -webkit-animation-delay:1.5s; }
#layer4 { -moz-animation-delay:2s; -webkit-animation-delay:2s; }
#layer5 { -moz-animation-delay:2.5s; -webkit-animation-delay:2.5s; }

#layer7 { -moz-animation-delay:1.5s; -webkit-animation-delay:1.5s; }
#layer8 { -moz-animation-delay:2s; -webkit-animation-delay:2s; }
#layer9 { -moz-animation-delay:2.5s; -webkit-animation-delay:2.5s; }
#layer10 { -moz-animation-delay:3s; -webkit-animation-delay:3s; }
#layer11 { -moz-animation-delay:3.5s; -webkit-animation-delay:3.5s; }

@-moz-keyframes loading {
    0%{-moz-transform:scale(0,0);}
    100%{-moz-transform:scale(1,1);}
}

@-webkit-keyframes loading {
    0%{-webkit-transform:scale(0,0);}
    100%{-webkit-transform:scale(1,1);}
}


@-moz-keyframes pulse {
    0%   {-moz-transform: scale(0);opacity: 0;}
    10%  {-moz-transform: scale(1);opacity: 0.5;}
    50%  {-moz-transform: scale(1.75);opacity: 0;}
    100% {-moz-transform: scale(0);opacity: 0;}
}

@-webkit-keyframes pulse {
    0%   {-webkit-transform: scale(0);opacity: 0;}
    10%  {-webkit-transform: scale(1);opacity: 0.5;}
    50%  {-webkit-transform: scale(1.75);opacity: 0;}
    100% {-webkit-transform: scale(0);opacity: 0;}
}

/* Loader Bar */

ul#loadbar {
    list-style:none;
    width:140px;
    margin:0 auto;
    padding-top:50px;
    padding-bottom:75px;
    margin-left: 530px;
}
ul#loadbar li {
    float:left;
    position:relative;
    width:11px;
    height:26px;
    margin-left:1px;
    border-left:1px solid #111; border-top:1px solid #111; border-right:1px solid #333; border-bottom:1px solid #333;
    background:#000;
}

ul#loadbar li:first-child { margin-left:0; }

.ins .bar {
    background-color:#2187e7;
    background-image: -moz-linear-gradient(45deg, #7ec0ee 25%, #a0eaff);
    background-image: -webkit-linear-gradient(45deg, #7ec0ee 25%, #a0eaff);
    width:11px;
    height:26px;
    opacity:0;
    -webkit-animation:fill .5s linear forwards;
    -moz-animation:fill .5s linear forwards;
}

#layerFill1 { -moz-animation-delay:0.5s; -webkit-animation-delay:0.5s; }
#layerFill2 { -moz-animation-delay:1s; -webkit-animation-delay:1s; }
#layerFill3 { -moz-animation-delay:1.5s; -webkit-animation-delay:1.5s; }
#layerFill4 { -moz-animation-delay:2s; -webkit-animation-delay:2s; }
#layerFill5 { -moz-animation-delay:2.5s; -webkit-animation-delay:2.5s; }
#layerFill6 { -moz-animation-delay:3s; -webkit-animation-delay:3s; }
#layerFill7 { -moz-animation-delay:3.5s; -webkit-animation-delay:3.5s; }
#layerFill8 { -moz-animation-delay:4s; -webkit-animation-delay:4s; }
#layerFill9 { -moz-animation-delay:4.5s; -webkit-animation-delay:4.5s; }
#layerFill10 { -moz-animation-delay:5s; -webkit-animation-delay:5s; }

@-moz-keyframes fill {
    0%{ opacity:0; }
    100%{ opacity:1; }
}

@-webkit-keyframes fill {
    0%{ opacity:0; }
    100%{ opacity:1; }
}

/* Trigger button for javascript */

.trigger, .triggerFull, .triggerBar {
    background: #000000;
    background: -moz-linear-gradient(top, #161616 0%, #000000 100%);
    background: -webkit-linear-gradient(top, #161616 0%,#000000 100%);
    border-left:1px solid #111; border-top:1px solid #111; border-right:1px solid #333; border-bottom:1px solid #333;
    font-family: Verdana, Geneva, sans-serif;
    font-size: 0.8em;
    text-decoration: none;
    text-transform: lowercase;
    text-align: center;
    color: #fff;
    padding: 10px;
    border-radius: 3px;
    display: block;
    margin: 0 auto;
    width: 140px;
}



</style>


<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.0/jquery.min.js" type="text/javascript"></script>
<script>


$(document).ready(function() {
    $('#loadbar').removeClass('ins');
        $('.triggerBar').click(function() {
            $('#loadbar').removeClass('ins').delay(10).queue(function(next){
                $(this).addClass('ins');
                next();
            });
            return false;
        });
});
</script>

<div class="container">
    <ul id="loadbar">
    <li><div id="layerFill1" class="bar"></div></li>
    <li><div id="layerFill2" class="bar"></div></li>
    <li><div id="layerFill3" class="bar"></div></li>
    <li><div id="layerFill4" class="bar"></div></li>
    <li><div id="layerFill5" class="bar"></div></li>
    <li><div id="layerFill6" class="bar"></div></li>
    <li><div id="layerFill7" class="bar"></div></li>
    <li><div id="layerFill8" class="bar"></div></li>
    <li><div id="layerFill9" class="bar"></div></li>
    <li><div id="layerFill10" class="bar"></div></li>
    </ul>
<a class="triggerBar" href="#">Start/Restart Animation</a>
</div>

#第1层{moz动画延迟:0.5s;-webkit动画延迟:0.5s;}
#第2层{-moz动画延迟:1s;-webkit动画延迟:1s;}
#第3层{-moz动画延迟:1.5s;-webkit动画延迟:1.5s;}
#第4层{-moz动画延迟:2s;-webkit动画延迟:2s;}
#layer5{-moz动画延迟:2.5s;-webkit动画延迟:2.5s;}
#第7层{moz动画延迟:1.5s;-webkit动画延迟:1.5s;}
#第8层{-moz动画延迟:2s;-webkit动画延迟:2s;}
#第9层{moz动画延迟:2.5s;-webkit动画延迟:2.5s;}
#第10层{-moz动画延迟:3s;-webkit动画延迟:3s;}
#第11层{moz动画延迟:3.5s;-webkit动画延迟:3.5s;}
@-moz关键帧加载{
0%{-moz变换:比例(0,0);}
100%{moz变换:标度(1,1);}
}
@-webkit关键帧加载{
0%{-webkit变换:缩放(0,0);}
100%{-webkit变换:比例(1,1);}
}
@-moz关键帧脉冲{
0%{moz变换:比例(0);不透明度:0;}
10%{moz变换:比例(1);不透明度:0.5;}
50%{-moz变换:比例(1.75);不透明度:0;}
100%{moz变换:比例(0);不透明度:0;}
}
@-webkit关键帧脉冲{
0%{-webkit变换:比例(0);不透明度:0;}
10%{-webkit变换:比例(1);不透明度:0.5;}
50%{-webkit变换:比例(1.75);不透明度:0;}
100%{-webkit变换:比例(0);不透明度:0;}
}
/*装载机杆*/
负载杆{
列表样式:无;
宽度:140px;
保证金:0自动;
填充顶部:50px;
填充底部:75px;
左边距:530px;
}
ul#负荷杆李{
浮动:左;
位置:相对位置;
宽度:11px;
高度:26px;
左边距:1px;
左侧边框:1px实心#111;顶部边框:1px实心#111;右侧边框:1px实心#333;底部边框:1px实心#333;
背景:#000;
}
ul#loadbar li:第一个子{左边距:0;}
.ins.酒吧{
背景色:#2187e7;
背景图像:-莫兹线性梯度(45度,#7ec0ee 25%,#a0eaff);
背景图像:-webkit线性梯度(45度,#7ec0ee 25%,#a0eaff);
宽度:11px;
高度:26px;
不透明度:0;
-webkit动画:填充。5s线性向前;
-moz动画:填充。5s线性向前;
}
#layerFill1{-moz动画延迟:0.5s;-webkit动画延迟:0.5s;}
#layerFill2{-moz动画延迟:1s;-webkit动画延迟:1s;}
#layerFill3{-moz动画延迟:1.5s;-webkit动画延迟:1.5s;}
#layerFill4{-moz动画延迟:2s;-webkit动画延迟:2s;}
#layerFill5{-moz动画延迟:2.5s;-webkit动画延迟:2.5s;}
#layerFill6{-moz动画延迟:3s;-webkit动画延迟:3s;}
#layerFill7{-moz动画延迟:3.5s;-webkit动画延迟:3.5s;}
#layerFill8{-moz动画延迟:4s;-webkit动画延迟:4s;}
#layerFill9{-moz动画延迟:4.5s;-webkit动画延迟:4.5s;}
#layerFill10{-moz动画延迟:5s;-webkit动画延迟:5s;}
@-moz关键帧填充{
0%{不透明度:0;}
100%{不透明度:1;}
}
@-webkit关键帧填充{
0%{不透明度:0;}
100%{不透明度:1;}
}
/*javascript的触发器按钮*/
.trigger、.triggerFull、.triggerBar{
背景:#000000;
背景:-莫兹线性梯度(顶部,#161616 0%,#000000 100%);
背景:-webkit线性梯度(顶部,#161616 0%,#000000 100%);
左侧边框:1px实心#111;顶部边框:1px实心#111;右侧边框:1px实心#333;底部边框:1px实心#333;
字体系列:Verdana,日内瓦,无衬线;
字号:0.8em;
文字装饰:无;
文本转换:小写;
文本对齐:居中;
颜色:#fff;
填充:10px;
边界半径:3px;
显示:块;
保证金:0自动;
宽度:140px;
}
$(文档).ready(函数(){
$('#loadbar').removeClass('ins');
$('.triggerBar')。单击(函数(){
$('#loadbar')。removeClass('ins')。延迟(10)。队列(函数(下一个){
$(this.addClass('ins');
next();
});
返回false;
});
});
。进度{
高度:50px;
利润率:15px;
字体系列:“Segoe UI”,Arial,无衬线;
字体大小:粗体;
文本阴影:1px 1px 3px#000;
盒影:-2px 1px 3px#222;
}
.容器液体{
-webkit变换:rotateX(-90度);/*Safari*/
变换:旋转(-90度);
}
.vtext{
-webkit变换:rotateX(-90度);/*Safari*/
变换:旋转(90度);
}

50%
30%

您是在使用引导或类似的工具,还是只是自己编写代码?或者感谢您的回复。我不是在使用引导程序,只是设计旧的HTML和CSS。我已经查看了默认的进度元素,并且能够获得进度条。但我要找的是与图中所示相同的样式。默认进度条为我提供了一个具有恒定填充或渐变填充的平面条,但没有如图所示的填充。我试着使用一些css,但是没有成功。谢谢你的回复。我已经查看了默认的进度元素,并且能够获得进度条。但我要找的是与图中所示相同的样式。默认进度条为我提供了一个具有恒定填充或渐变填充的平面条,但没有如图所示的填充。我试着使用一些css,但没有运气。太棒了!!!这正是我想要的。工作起来很有魅力。谢谢,阿杰。感谢您的帮助,欢迎光临。你有身份证吗