清新时钟走动运行效果
代码语言:html
所属分类:其他
代码描述:清新时钟走动运行效果
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <style> *, *:before, *:after { box-sizing: border-box; } html, body { height: 100%; width: 100%; } body { font-size: 100%; font-family: helvetica; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; background: linear-gradient(to bottom, #969696 0%, #6e6e6e 100%); } #clock { position: absolute; top: 0; left: 0; right: 0; bottom: 0; margin: auto; width: 21em; height: 21em; border-radius: 50%; background: #eee; border: 0.2em solid #d0d0d0; box-shadow: 0 1.2em 0 -1em white, 0 -0.1em 0.3em 0 #fff, 0 0 0 0.6em #e7e7e7, 0 0.6em 1.2em 0 rgba(0, 0, 0, 0.5), inset 0 0.5em 1em 0 rgba(0, 0, 0, 0.3), inset 0 0 8em 0 rgba(0, 0, 0, 0.2); } #clock:before { display: block; content: ""; position: absolute; background: #dedede; left: -2em; top: -2em; width: 25em; height: 25em; border-radius: 4.6em; z-index: -1; box-shadow: inset 0 -0.2em 0.2em 0 rgba(0, 0, 0, 0.2), inset 0 0.2em 2em 0 #fff; } #clock:after { display: block; content: ""; position: absolute; height: inherit; width: inherit; background: transparent; top: 0; left: 0; border-radius: inherit; box-shadow: inset 12em 14em 0 -10em rgba(255, 255, 255, 0.25); z-index: 4; } #clock .hour { position: absolute; top: 0; left: 0; right: 0; bottom: 0; margin: auto; width: 0.5em; height: 16.4em; background: transparent; box-shadow: 0 -1em 0 -0.1em #383838, 0 1em 0 -0.1em #383838; transform: rotate(30deg); } #clock .hour:after, #clock .hour:before { display: block; content: ""; position: absolute; height: inherit; width: inherit; background: inherit; box-shadow: inherit; backface-visibility: inherit; } #clock .hour:before { transform: rotate(30deg); } #clock .hour:after { transform: rotate(-30deg); } #clock .hour:nth-of-type(1) { transform: rotate(-60deg); } #clock .min { position: absolute; top: 0; left: 0; right: 0; bottom: 0; margin: auto; width: 0.3em; height: 17em; background: transparent; box-shadow: 0 -0.6em 0 -0.1em #383838, 0 0.6em 0 -0.1em #383838; z-index: -1; transform: rotate(-54deg); } #clock .min:after, #clock .min:before { display: block; content: ""; position: absolute; height: inherit; width: inherit; background: inherit; box-shadow: inherit; backface-visibility: inherit; z-index: 0; } #clock .min:before { transform: rotate(6deg); } #clock .min:after { transform: rotate(12deg); } #clock .min:nth-child(2) { transform: rotate(-36deg); } #clock .min:nth-child(3) { transform: rotate(-18deg); } #clock .min:nth-child(4) { transform: rotate(6deg); } #clock .min:nth-child(5) { transform: rotate(24deg); } #alarm { position: absolute; top: 0; left: 0; right: 0; bottom: 0; margin: auto; background: #f8f8f8; width: 2.6em; height: 2.6em; border-radius: 50%; transform: rotate(-45deg); box-shadow: 0 0.2em 0.4em 0 rgba(0, 0, 0, 0.1); } #alarm:after { display: block; content: ""; position: absolute; width: 0.4em; height: 4.8em; top: -4.6em; background: linear-gradient(to bottom, #f6f6f6 0%, #f8f8f8 100%); left: 0; right: 0; margin: 0 auto; z-index: -3; box-shadow: inset 0 1.2em 0 #4ca440, -0.2em -0.2em 0.3em 0 rgba(0, 0, 0, 0.1); } #sec { position: absolute; top: 0; left: 0; right: 0; bottom: 0; margin: auto; background: radial-gradient(ellipse at center, #ffd322 0%, #fbc900 100%); width: 2em; height: 2em; border-radius: 50%; border: 0.14em solid #fbc900; z-index: 3; } #sec:before, #sec:after { display: block; content: ""; position: absolute; } #sec:before { background: #fbc900; width: 0.8em; height: 1.5em; top: 1.8em; left: 0; right: 0; margin: 0 auto; border-radius: 0 0 2em 2.........完整代码请登录后点击上方下载按钮下载查看
网友评论0