纯css实现圆环圆形进度条效果代码
代码语言:html
所属分类:进度条
代码描述:纯css实现圆环圆形进度条效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <style> @import url(https://fonts.googleapis.com/css?family=Lato:700); *, *:before, *:after { box-sizing: border-box; } html, body { background: #ecf0f1; color: #444; font-family: 'Lato', Tahoma, Geneva, sans-serif; font-size: 16px; padding: 10px; } .set-size { font-size: 10em; } .charts-container:after { clear: both; content: ''; display: table; } .pie-wrapper { height: 1em; width: 1em; float: left; margin: 15px; position: relative; } .pie-wrapper:nth-child(3n + 1) { clear: both; } .pie-wrapper .pie { height: 100%; width: 100%; clip: rect(0, 1em, 1em, 0.5em); left: 0; position: absolute; top: 0; } .pie-wrapper .pie .half-circle { height: 100%; width: 100%; border: 0.1em solid #3498db; border-radius: 50%; clip: rect(0, 0.5em, 1em, 0); left: 0; position: absolute; top: 0; } .pie-wrapper .label { background: #34495e; border-radius: 50%; bottom: 0.4em; color: #ecf0f1; cursor: default; display: block; font-size: 0.25em; left: 0.4em; line-height: 2.8em; position: absolute; right: 0.4em; text-align: center; top: 0.4em; } .pie-wrapper .label .smaller { color: #bdc3c7; font-size: .45em; padding-bottom: 20px; vertical-align: super; } .pie-wrapper .shadow { height: 100%; width: 100%; border: 0.1em solid #bdc3c7; border-radius: 50%; } .pie-wrapper.style-2 .label { background: none; color: #7f8c8d; } .pie-wrapper.style-2 .label .smaller { color: #bdc3c7; } .pie-wrapper.progress-30 .pie .half-circle { border-color: #3498db; } .pie-wrapper.progress-30 .pie .left-side { -webkit-transform: rotate(108deg); transform: rotate(108deg); } .pie-wrapper.progress-30 .pie .right-side { display: none; } .pie-wrapper.progress-60 .pie { clip: rect(auto, auto, auto, auto); } .pie-wrapper.progress-60 .pie .half-circle { border-color: #9b59b6; } .pie-wrapper.progress-60 .pie .left-side { -webkit-transform: rotate(216deg); transform: rotate(216deg); } .pie-wrapper.progress-60 .pie .right-side { -webkit-transform: rotate(180deg); transform: rotate(180deg); } .pie-wrapper.progress-90 .pie { clip: rect(auto, auto, auto, auto); } .pie-wrapper.progress-90 .pie .half-circle { border-color: #e67e22; } .pie-wrapper.progress-90 .pie .left-side { -webkit-transform: rotate(324deg); transform: rotate(324deg); } .pie-wrapper.progress-90 .pie .right-side { -webkit-transform: rotate(180deg); transform: rotate(180deg); } .pie-wrapper.progress-45 .pie .half-circle { border-color: #1abc9c; } .pie-wrapper.progress-45 .pie .left-side { -webkit-transform: rotate(162deg); transform: rotate(162deg); } .pie-wrapper.progress-45 .pie .right-side { display: none; } .pie-wrapper.progress-75 .pie { clip: rect(auto, auto, auto, auto); } .pie-wrapper.progress-75 .pie .half-circle { border-color: #8e44ad; } .pie-wrapper.progress-75 .pie .left-side { -webkit-transform: rotate(270deg); transform: rotate(270deg); } .pie-wrapper.progress-75 .pie .right-side { -webkit-transform: rotate(180deg); transform: rotate(180deg); } .pie-wrapper.progress-95 .pie { clip: rect(auto, auto, auto, auto); } .pie-wrapper.progress-95 .pie .half-circle { border-color: #e74c3c; } .pie-wrapper.progress-95 .pie .left-side { -webkit-transform: rotate(342deg); transform: rotate(342deg); } .pie-wrapper.progress-95 .pie .right-side { -webkit-transform: rotate(180deg); transform: rotate(180deg); } .pie-wrapper--solid { border-radius: 50%; overflow: hidden; } .pie-wrapper--solid:before { border-radius: 0 100% 100% 0 / 50%; .........完整代码请登录后点击上方下载按钮下载查看
网友评论0