css实现立方体柱子立体三维进度条效果代码
代码语言:html
所属分类:进度条
代码描述:css实现立方体柱子立体三维进度条效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable = no"> <style> @import url(https://fonts.googleapis.com/css?family=Open+Sans:700,300); html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, canvas, details, embed, figure, figcaption, footer, header, hgroup, menu, nav, output, ruby, section, summary, time, mark, audio, video { margin: 0; padding: 0; border: 0; font: inherit; font-size: 100%; vertical-align: baseline; } html { line-height: 1; } ol, ul { list-style: none; } table { border-collapse: collapse; border-spacing: 0; } caption, th, td { text-align: left; font-weight: normal; vertical-align: middle; } q, blockquote { quotes: none; } q:before, q:after, blockquote:before, blockquote:after { content: ""; content: none; } a img { border: none; } article, aside, details, figcaption, figure, footer, header, hgroup, main, menu, nav, section, summary { display: block; } body { font-family: 'Open Sans', sans-serif; font-size: 16px; font-weight: 300; line-height: 1em; text-align: center; color: #444; background: #d0d0d0; } h1 { font-size: 2.5em; margin: 2em 0 .5em; } h2 { margin-bottom: 3em; } em, strong { font-weight: 700; } input { display: none; } article, section { position: relative; display: block; margin-bottom: 2em; padding: 0; } article:not(section):last-of-type, section:not(section):last-of-type { margin-bottom: 0; } p { line-height: 1.5em; max-width: 20em; margin: 1.5em auto 2em; padding-bottom: 2em; } p span { display: block; } .content { position: absolute; overflow: hidden; width: 100%; margin: 5em auto 0; } .content article { transition: transform .3s ease-in-out; transform: translateX(100%); } .content article p { border-bottom: 1px dotted #444; } .content article label { display: inline-block; margin-bottom: 3em; } .content article label input { display: inline-block; } .container { z-index: 1; display: flex; overflow: hidden; flex-direction: column; justify-content: center; } /* * * START // CHART'S RULES -> "if you're picking code, don't forget the variables :)" */ .chart { font-size: 1.8em; display: flex; flex-direction: row; height: 12em; justify-content: center; perspective: 1000px; perspective-origin: 50% 50%; } .bar { font-size: 1em; position: relative; width: 2em; padding: 1em; transition: transform 2s linear; transform: rotateX(-30deg) rotateY(-135deg); transform-style: preserve-3d; } .bar.red .face.floor { background-color: rgba(185, 0, 110, 0.2); } .bar.red .face > .growing-bar { background-color: rgba(236, 0, 140, 0.8); } .bar.red .face > .growing-bar:before { color: #530031; border-top-color: #b9006e; } .bar.cyan .face.floor { background-color: rgba(39, 187, 241, 0.2); } .bar.cyan .face > .growing-bar { background-color: rgba(87, 202, 244, 0.8); } .bar.cyan .face > .growing-bar:before { color: #0b7da7; border-top-color: #27bbf1; } .bar.navy .face.floor { background-color: rgba(6, 36, 58, 0.2); } .bar.navy .face > .growing-bar { background-color: rgba(10, 64, 105, 0.8); } .bar.navy .face > .growing-bar:before { color: black; border-top-color: #06243a; } .bar.lightGray .face.floor { background-color: rgba(119, 119, 119, 0.2); } .bar.lightGray .face > .growing-bar { background-color: rgba(145, 145, 145, 0.8); } .bar.lightGray .face > .growing-bar:before { color: #444444; border-top-color: #777777; } .bar.yellow .face.floor { background-color: rgba(194, 157, 11, 0.2); } .bar.yellow .face > .growing-bar { background-color: rgba(241, 196, 15, 0.8); } .bar.yellow .face > .growing-bar:before { color: #614f06; border-top-color: #c29d0b; } .bar.lime .face.floor { background-color: rgba(88, 150, 0, 0.2); } .bar.lime .face > .growing-bar { background-color: rgba(118, 201, 0, 0.8); } .bar.lime .face > .growing-bar:before { color: #1c3000; border-top-color: #589600; } .bar.gray .face.floor { background-color: rgba(43, 43, 43, 0.2); } .bar.gray .face > .growing-bar { background-color: rgba(68, 68, 68, 0.8); } .bar.gray .face > .growing-bar:before { color: black; border-top-color: #2b2b2b; } .bar .face { position: relative; bottom: 0; width: 2em; height: 2em; background-position: center center; } .bar .side-0, .bar .side-1 { overflow: hidden; height: 10em; } .bar .side-0 { transform: rotateY(90deg) translateZ(1em); background-color: rgba(241, 241, 241, 0.8); } .bar .side-0 .growing-bar { background-color: #57caf4; } .bar .side-1 { transform: rotateY(180deg) translateY(-10em) translateZ(1em); background-color: rgba(216, 216, 216, 0.8); } .bar .side-1 .growing-bar { background-color: #10b3ef; } .bar .top { transform: rotateX(90deg) translateZ(21em); text-align: center; background-color: rgba(254, 254, 254, 0.8); } .bar .floor { transform: rotateX(-90deg) translateY(0em) translateZ(-13em) rotate(180deg); text-align: center; background-color: transparent; box-shadow: 0 0 0.6em rgba(0, 0, 0, 0.3), 0.6em -1em 3em rgba(0, 0, 0, 0.3), 1em 1em 10em rgba(254, 254, 254, 0.8); } .bar .growing-bar { display: inline-block; width: 100%; height: 100%; transition: all .3s ease-in-out; transform: translateY(100%); opacity: 0; } .bar .growing-bar:before { font-family: 'Open Sans', sans-serif; font-size: .6em; font-weight: 700; display: inline-block; box-sizing: content-box; padding: .8em; text-align: center; opacity: 1; color: #0a4069; border-top: 2px dotted #0a4069; } .small-font-size { font-size: 1em; } .reglar-font-size { font-size: 1.5em; } .big-font-size { font-size: 1.8em; } .chart .bar-100 .face.side-0 .growing-bar, .chart .bar-100 .face.side-1 .growing-bar { transform: translateY(0%); opacity: .8; } .chart .bar-100 .face.side-0 .growing-bar:before, .chart .bar-100 .face.side-1 .growing-bar:before { content: "100"; } .chart .bar-99 .face.side-0 .growing-bar, .chart .bar-99 .face.side-1 .growing-bar { transform: translateY(1%); opacity: .8; } .chart .bar-99 .face.side-0 .growing-bar:before, .chart .bar-99 .face.side-1 .growing-bar:before { content: "99"; } .chart .bar-98 .face.side-0 .growing-bar, .c.........完整代码请登录后点击上方下载按钮下载查看
网友评论0