CSS 应用实例


<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>CSS 应用实例</title>
    <link rel="stylesheet" href="progress_style.css" type="text/css">
</head>
<body>
<h2>进度条</h2>
<ul id="skill">
    <li><span class="bar graphic-design"></span><h3>Graphic Design</h3></li>
    <li><span class="bar html-css"></span><h3>Html // Css</h3></li>
    <li><span class="bar jquery"></span><h3>jQuery // MoTools</h3></li>
    <li><span class="bar wordpress"></span><h3>Wordpress</h3></li>
</ul>

</body>
</html>


progress_style.css



body { background: #E9E5E2 ; }

#skill {
    list-style: none;
    font: 12px;
    width: 296px;
    margin: 50px auto 0;
    position: relative;
    line-height: 2em;
    padding: 30px 0;
}

#skill li {
    margin-bottom:50px;
    background:#e9e5e2;
    background-image: -webkit-gradient(linear, left top, left bottom, from(#e1ddd9), to(#e9e5e2));
    background-image: -webkit-linear-gradient(top, #e1ddd9, #e9e5e2);
    background-image: -moz-linear-gradient(top, #e1ddd9, #e9e5e2);
    background-image: -ms-linear-gradient(top, #e1ddd9, #e9e5e2);
    background-image: -o-linear-gradient(top, #e1ddd9, #e9e5e2);
    background-image: linear-gradient(top, #e1ddd9, #e9e5e2);
    height:20px;
    border-radius:10px;
    -moz-box-shadow: 0 1px 0px #bebbb9 inset, 0 1px 0 #fcfcfc;
    -webkit-box-shadow: 0 1px 0px #bebbb9 inset, 0 1px 0 #fcfcfc;
    box-shadow: 0 1px 0px #bebbb9 inset, 0 1px 0 #fcfcfc;
}

#skill li h3 {
    position:relative;
    top:-25px;
}

.bar {
    height:18px;
    margin:1px 2px;
    position:absolute;
    border-radius:10px;
    -moz-box-shadow: 0 1px 0px #fcfcfc inset, 0 1px 0 #bebbb9;
    -webkit-box-shadow: 0 1px 0px #fcfcfc inset, 0 1px 0 #bebbb9;
    box-shadow: 0 1px 0px #fcfcfc inset, 0 1px 0 #bebbb9;
}

.graphic-design {
    width:100%;
    -moz-animation:graphic-design 2s ease-out;
    -webkit-animation:graphic-design 2s ease-out;
    background-color: #f674a4;
    background-image: -webkit-gradient(linear, left top, left bottom, from(#f674a4), to(#e06995));
    background-image: -webkit-linear-gradient(top, #f674a4, #e06995);
    background-image: -moz-linear-gradient(top, #f674a4, #e06995);
    background-image: -ms-linear-gradient(top, #f674a4, #e06995);
    background-image: -o-linear-gradient(top, #f674a4, #e06995);
    background-image: linear-gradient(top, #f674a4, #e06995);
}

.html-css {
    width:90%;
    -moz-animation:html-css 2s ease-out;
    -webkit-animation:html-css 2s ease-out;
    background-color: #f0bb4b;
    background-image: -webkit-gradient(linear, left top, left bottom, from(#f0bb4b), to(#d9aa44));
    background-image: -webkit-linear-gradient(top, #f0bb4b, #d9aa44);
    background-image: -moz-linear-gradient(top, #f0bb4b, #d9aa44);
    background-image: -ms-linear-gradient(top, #f0bb4b, #d9aa44);
    background-image: -o-linear-gradient(top, #f0bb4b, #d9aa44);
    background-image: linear-gradient(top, #f0bb4b, #d9aa44);
}

.jquery {
    width:65%;
    -moz-animation:jquery 2s ease-out;
    -webkit-animation:jquery 2s ease-out;
    background-color: #a1ce5b;
    background-image: -webkit-gradient(linear, left top, left bottom, from(#a1ce5b), to(#91ba52));
    background-image: -webkit-linear-gradient(top, #a1ce5b, #91ba52);
    background-image: -moz-linear-gradient(top, #a1ce5b, #91ba52);
    background-image: -ms-linear-gradient(top, #a1ce5b, #91ba52);
    background-image: -o-linear-gradient(top, #a1ce5b, #91ba52);
    background-image: linear-gradient(top, #a1ce5b, #91ba52);
}

.wordpress {
    width:80%;
    -moz-animation:wordpress 2s ease-out;
    -webkit-animation:wordpress 2s ease-out;
    background-color: #66b3cc;
    background-image: -webkit-gradient(linear, left top, left bottom, from(#66b3cc), to(#5da3ba));
    background-image: -webkit-linear-gradient(top, #66b3cc, #5da3ba);
    background-image: -moz-linear-gradient(top, #66b3cc, #5da3ba);
    background-image: -ms-linear-gradient(top, #66b3cc, #5da3ba);
    background-image: -o-linear-gradient(top, #66b3cc, #5da3ba);
    background-image: linear-gradient(top, #66b3cc, #5da3ba)
}

@-moz-keyframes graphic-design {0%  { width:0px;} 100%{ width:100%;}  }
@-moz-keyframes html-css        { 0%  { width:0px;} 100%{ width:90%;}  }
@-moz-keyframes jquery      { 0%  { width:0px;} 100%{ width:65%;}  }
@-moz-keyframes wordpress   { 0%  { width:0px;} 100%{ width:80%;}  }

@-webkit-keyframes graphic-design       { 0%  { width:0px;} 100%{ width:100%;}  }
@-webkit-keyframes html-css        { 0%  { width:0px;} 100%{ width:90%;}  }
@-webkit-keyframes jquery      { 0%  { width:0px;} 100%{ width:65%;}  }
@-webkit-keyframes wordpress   { 0%  { width:0px;} 100%{ width:80%;}  }

©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

  • 问答题47 /72 常见浏览器兼容性问题与解决方案? 参考答案 (1)浏览器兼容问题一:不同浏览器的标签默认的外补...
    _Yfling阅读 14,211评论 1 92
  • 中文翻译 ng help ng build 构建您的应用程序并将其放入输出路径(dist /默认情况下)。 别名:...
    4ea0af17fd67阅读 2,152评论 0 0
  • 十多年来不可避免地遇到过不少心动的人,只是囿于自身的原因一直没能如己所愿,时至今日难以释怀,倘若自己足够优秀,就不...
    无风流岚阅读 233评论 0 0

友情链接更多精彩内容