Toggle navigation
在线编辑器
在线代码
文本比较
jQuery下载
前端库
在线手册
登录/注册
下载代码
html
css
js
分享到微信朋友圈
X
html
css
:root { --light-hue: 260deg; --light-saturation: 100%; --light-power: 80%; /* Commend this to disable auto color switch */ -webkit-animation: color 20s linear infinite; animation: color 20s linear infinite; } /* Watch */ .Watch { --dimmer: clamp(10%, var(--light-power), 40%); --light: var(--light-hue) calc(var(--light-saturation) - 40%) calc(var(--light-power) + 35%); --light-dimmed: var(--light-hue) calc(var(--light-saturation) - 90%) var(--dimmer); --light-dark: var(--light-hue) var(--light-saturation) calc(var(--light-power) / 10); -webkit-filter: drop-shadow(0 10px 50px hsla(0deg, 0%, 0%, 0.6)); filter: drop-shadow(0 10px 50px hsla(0deg, 0%, 0%, 0.6)); } /* Strap */ .Strap { position: relative; box-shadow: inset 0 10vmax 2vmax -10vmax hsl(var(--light-hue) 50% 0% / 15%); background: -webkit-gradient( linear, left top, left bottom, from(hsla(0deg, 0%, 100%, 0.08)), to(hsl(var(--light) / 15%)) ), hsl(var(--light-dark)); background: linear-gradient( to bottom, hsla(0deg, 0%, 100%, 0.08), hsl(var(--light) / 15%) ), hsl(var(--light-dark)); height: 16vmax; width: 70%; margin: 0 auto; z-index: -2; border-radius: 50% 50% 0% 0% / 30% 30% 0 0 /* Reflect stripe */ } .Strap[reflect="true"] { -webkit-transform: scaleY(-1); transform: scaleY(-1); } .Strap { /* All straps */ } .Strap::before, .Strap::after { display: block; background: inherit; background-size: 100% 200%; background-position: 0 100%; position: absolute; bottom: 0.3vmax; width: 12vh; height: 9vmax; z-index: -1; -webkit-transform: translateY(5px); transform: translateY(5px); -webkit-mask-size: 100% 100%; mask-size: 100% 100%; -webkit-mask-position: 0 24px; mask-position: 0 24px; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; } .Strap { /* Top strap */ } .Strap::before { right: 99.5%; -webkit-mask-image: radial-gradient( ellipse farthest-corner at left top, transparent 70%, black 70.5% ); mask-image: radial-gradient( ellipse farthest-corner at left top, transparent 70%, black 70.5% ); } .Strap { /* Bottom strap */ } .Strap::after { left: 99.5%; -webkit-mask-image: radial-gradient( ellipse farthest-corner at right top, transparent 70%, black 70.5% ); mask-image: radial-gradient( ellipse farthest-corner at right top, transparent 70%, black 70.5% ); } /* Screen */ .Screen { --sub-reflection: var(--light-hue) calc(var(--light-saturation) / 5) 60%; --screen-color: hsl(var(--light-hue) clamp(0%, var(--light-saturation), 40%) 2%); position: relative; background-color: var(--screen-color); display: grid; -webkit-box-align: center; align-items: center; justify-items: center; width: 38vmax; height: 46vmax; border: 2px solid #000; border-radius: 21% 21% 21% 21% / 20% 20% 20% 20%; background-position: center center; background-size: 200%; box-shadow: 25px 0 10px -20px hsl(var(--light) / 60%), -25px 0 10px -20px hsl(var(--light) / 60%), 0 20px 10px -20px hsl(var(--light) / 60%), 0 -20px 10px -20px hsl(var(--light) / 60%), inset 0 125px 3px -125px white, inset 0 -125px 3px -125px white, inset 125px 0 3px -125px white, inset -125px 0 3px -125px white, inset 0 50px 5px -50px hsl(var(--light)), inset 0 -50px 5px -50px hsl(var(--light)), inset 50px 0 5px -50px hsl(var(--light)), inset -50px 0 5px -50px hsl(var(--light)), inset 0 50px 15px -50px hsl(var(--light)), inset 0 -50px 15px -50px hsl(var(--light)), inset 50px 0 15px -50px hsl(var(--light)), inset -50px 0 15px -50px hsl(var(--light)); background-image: repeating-conic-gradient( hsl(var(--sub-reflection)), hsl(var(--sub-reflection) / 7%) 10%, hsl(var(--sub-reflection) / 7%) 14%, hsl(var(--sub-reflection)) 19%, hsl(var(--sub-reflection)) 27%, hsl(var(--sub-reflection) / 7%) 25% ) /* External frame */ } .Screen::before { position: absolute; box-shadow: inset 0 0.3vmax 0.7vmax -0.4vmax hsl(0deg, 0%, 0%), inset 0 -0.3vmax 0.7vmax -0.4vmax hsl(0deg, 0%, 0%), inset 0 0 0.7vmax 0.6vmax hsl(var(--light-dark)); left: -5%; right: -5%; top: -4%; bottom: -4%; z-index: -1; border-radius: 23% 23% 23% 23% / 22% 22% 22% 22%; background: repeating-conic-gradient( transparent 0%, hsla(0deg, 0%, 0%, 0.6) 10%, hsla(0deg, 0%, 0%, 0.6) 14%, transparent 19%, transparent 26%, hsla(0deg, 0%, 0%, 0.6) 25% ), hsl(var(--light-dimmed)); } .Screen { /* Screen mask */ } .Screen::after { position: absolute; top: 7%; bottom: 2%; left: 5%; right: 5%; border-radius: 15% 15% 23% 23%; background: -webkit-gradient( linear, left top, right top, from(hsl(var(--light-dimmed) / 20%)), color-stop(40%, transparent) ), var(--screen-color) ; background: linear-gradient( to right, hsl(var(--light-dimmed) / 20%), transparent 40% ), var(--screen-color) ; -webkit-filter: blur(1px); filter: blur(1px); } /* Digital Crown */ .Crown { position: absolute; top: 8vmax; left: 103%; width: 2.8vmax; height: 9vmax; border-radius: 20% 20% 20% 20% / 30% 30% 30% 30%; box-shadow: -0.5vmax 0 0.3vmax -0.1vmax black, -1vmax 0 1vmax -0.2vmax hsla(0deg, 0%, 0%, 0.6), -0.5vmax 0 0.5vmax -1vmax hsl(var(--light-dark)), inset 1px 0 6px 2px hsl(var(--light) / 10%), inset 2px 0 6px 5px hsla(0deg, 0%, 0%, 0.8), inset -2px 0 2px hsl(var(--light-dark) / 70%); background: -webkit-gradient( linear, left top, right top, color-stop(10%, hsl(var(--light-dark) / 50%)), color-stop(40%, transparent), color-stop(70%, transparent), color-stop(90%, hsl(var(--light-dimmed) / 60%)) ), repeating-linear-gradient( transparent 2%, transparent 5%, hsl(var(--light-dark) / 50%) 5.1%, hsl(var(--light-dark)/50%) 9%, hsl(var(--light)) 9.1%, hsl(var(--light)) 9.5%, transparent 9.6% ), -webkit-gradient( linear, left top, left bottom, from(hsl(var(--light))), color-stop(hsl(var(--light) / 30%)), color-stop(hsl(var(--light) / 10%)), to(hsl(var(--light-dark))) ), hsl(var(--light-dimmed)); background: linear-gradient( to right, hsl(var(--light-dark) / 50%) 10%, transparent 40%, transparent 70%, hsl(var(--light-dimmed) / 60%) 90% ), repeating-linear-gradient( transparent 2%, transparent 5%, hsl(var(--light-dark) / 50%) 5.1%, hsl(var(--light-dark)/50%) 9%, hsl(var(--light)) 9.1%, hsl(var(--light)) 9.5%, transparent 9.6% ), linear-gradient( to bottom, hsl(var(--light)), hsl(var(--light) / 30%), hsl(var(--light) / 10%), hsl(var(--light-dark)) ), hsl(var(--light-dimmed)) /* Crown reflection */ } .Crown::before { position: absolute; top: 50%; left: -55%; -webkit-transform: translateY(-50%); transform: translateY(-50%); width: 20%; height: 70%; border-radius: 100% 0% 0% 100% / 50% 0% 0% 50%; -webkit-filter: blur(0.15vw); filter: blur(0.15vw); opacity: 0.7; box-shadow: inset -2px 0 0 1px hsl(var(--light-dark)); background-color: hsl(0deg, 0%, 0%); } /* Home button */ .Button { width: 0.5vw; height: 35%; position: absolute; left: calc(100% + 5%); -webkit-transform: translateX(-100%); transform: translateX(-100%); bottom: 20%; border-radius: 100% 0% 0% 100% / 50% 50% 50% 50%; box-shadow: inset -0.8vmax 0 0 -0.5vmax hsl(var(--light-dark) / 70%), -0.1vmax 0 0 0.1vmax hsl(var(--light-dark)) ; background-image: -webkit-gradient( linear, left top, left bottom, color-stop(5%, hsl(var(--light-dimmed))), color-stop(10%, hsl(var(--light-dark))), color-stop(15%, hsl(var(--light-dark))), color-stop(20%, hsl(var(--light) / 60%)), color-stop(70%, hsl(var(--light)/60%)), color-stop(85%, hsl(var(--light-dark))), color-stop(90%, hsl(var(--light-dark))), to(hsl(var(--light-dimmed))) ); background-image: linear-gradient( to bottom, hsl(var(--light-dimmed)) 5%, hsl(var(--light-dark)) 10%, hsl(var(--light-dark)) 15%, hsl(var(--light) / 60%) 20%, hsl(var(--light)/60%) 70%, hsl(var(--light-dark)) 85%, hsl(var(--light-dark)) 90%, hsl(var(--light-dimmed)) ); } /* Clock */ .Clock { width: 28vmax; height: 28vmax; position: relative; z-index: 1; box-sizing: border-box } .Clock::before { position: absolute; top: 0; left: 0%; width: 100%; height: 100%; border-radius: 100%; -webkit-mask-image: radial-gradient( circle at center, transparent 66%, black 66.1% ); mask-image: radial-gradient( circle at center, transparent 66%, black 66.1% ); background-image: repeating-conic-gradient( white 0, white 0.25%, transparent 0.26%, transparent 6.24%, white 6.25%, white 6.25% ), repeating-conic-gradient( hsla(0deg, 0%, 100%, 0.2) 0%, hsla(0deg,0%,100%,0.2) 0.25%, transparent 0.26%, transparent 1.25%, hsla(0deg, 0%, 100%, 0.2) 1.25%, hsla(0deg,0%,100%,0.2) 1.25% ) } .Clock::after { background-color: white; width: 1.3vmax; height: 1.3vmax; margin-top: -0.65vmax; margin-left: -0.65vmax; border-radius: 100%; position: absolute; left: 50%; top: 50%; -webkit-mask-image: radial-gradient( circle at center, transparent 33%, black 33.1% ); mask-image: radial-gradient( circle at center, transparent 33%, black 33.1% ) } /* Clock hands */ .Hand { display: -webkit-box; display: flex; -webkit-box-align: center; align-items: center; -webkit-box-pack: end; justify-content: flex-end; width: 100%; padding: 0.5vmax; height: 100%; position: absolute; top: 0; left: 0; z-index: 1; -webkit-transform-origin: 50% 50%; transform-origin: 50% 50%; -webkit-animation: rotation 10s linear infinite; animation: rotation 10s linear infinite } .Hand::after { background-color: white; border-radius: 200px; width: 11.7vmax; height: 1vmax; margin-left: -0.3vmax; } .Hand::before { background-color: white; height: 0.5vmax; width: 1.7vmax; margin-left: -1.7vmax; display: block; } .Hand[size="small"] { -webkit-animation: rotation 30s linear infinite; animation: rotation 30s linear infinite; } .Hand[size="small"]::after { width: 6vmax; margin-right: 5.5vmax; } /* Seconds hand*/ .Chrono { display: -webkit-box; display: flex; -webkit-box-align: center; align-items: center; -webkit-box-pack: end; justify-content: flex-end; position: absolute; left: 0; top: 0; height: 100%; width: 100%; z-index: 2; -webkit-transform-origin: 50% 50%; transform-origin: 50% 50%; -webkit-animation: rotation 60s linear infinite; animation: rotation 60s linear infinite; -webkit-animation-timing-function: steps(80, start); animation-timing-function: steps(80, start) } .Chrono::before { height: 0.29vmax; width: 16vmax; background-color: orange; z-index: 1; } .Chrono::after { background-color: var(--screen-color); box-shadow: 0 0 0 0.2vmax orange; width: 0.5vmax; height: 0.5vmax; margin-top: -0.25vmax; margin-left: -0.25vmax; border-radius: 100%; position: absolute; left: 50%; top: 50%; z-index: 1; } /* Hands animation */ @-webkit-keyframes rotation { 0% { -webkit-transform: rotate(0deg); transform: rotate(0deg); } 100% { -webkit-transform: rotate(1turn); transform: rotate(1turn); } } @keyframes rotation { 0% { -webkit-transform: rotate(0deg); transform: rotate(0deg); } 100% { -webkit-transform: rotate(1turn); transform: rotate(1turn); } } html { block-size: 100%; inline-size: 100%; background: hsl(var(--light-hue) var(--light-saturation) var(--light-power)); box-sizing: border-box; } *, *::before, *::after { box-sizing: inherit; } body { min-block-size: 100%; min-inline-size: 100%; box-sizing: border-box; display: grid; margin: 0; align-content: center; -webkit-box-pack: center; justify-content: center; -webkit-transform: scale(0.8); transform: scale(0.8); } input { -webkit-margin-after: 1rem; margin-block-end: 1rem } input:last-of-type { -webkit-margin-after: 4rem; margin-block-end: 4rem; } @-webkit-keyframes color { 0% { --light-hue: 260deg; --light-saturation: 100%; --light-power: 80%; } 20% { --light-hue: 360deg; --light-saturation: 100%; --light-power: 50%; } 40% { --light-hue: 160deg; --light-saturation: 100%; --light-power: 80%; } 60% { --light-hue: 160deg; --light-saturation: 0%; --light-power: 0%; } 80% { --light-hue: 260deg; --light-saturation: 100%; --light-power: 80%; } 100% { --light-hue: 200deg; --light-saturation: 0%; --light-power: 100%; } } @keyframes color { 0% { --light-hue: 260deg; --light-saturation: 100%; --light-power: 80%; } 20% { --light-hue: 360deg; --light-saturation: 100%; --light-power: 50%; } 40% { --light-hue: 160deg; --light-saturation: 100%; --light-power: 80%; } 60% { --light-hue: 160deg; --light-saturation: 0%; --light-power: 0%; } 80% { --light-hue: 260deg; --light-saturation: 100%; --light-power: 80%; } 100% { --light-hue: 200deg; --light-saturation: 0%; --light-power: 100%; } } *::before, *::after { content: ''; }
JavaScript
粒子
时间
文字
hover
canvas
3d
游戏
音乐
火焰
水波
轮播图
鼠标跟随
动画
css
加载动画
导航
菜单
按钮
滑块
tab
弹出层
统计图
svg
×
Close
在线代码下载提示
开通在线代码永久免费下载,需支付20jQ币
开通后,在线代码模块中所有代码可终身免费下!
您已开通在线代码永久免费下载,关闭提示框后,点下载代码可直接下载!
您已经开通过在线代码永久免费下载
对不起,您的jQ币不足!可通过发布资源 或
直接充值获取jQ币
取消
开通下载
<!doctype html> <html> <head> <meta charset="utf-8"> <title>纯CSS手表-jq22.com</title> <script src="https://www.jq22.com/jquery/jquery-1.10.2.js"></script> <style>
</style> </head> <body>
<script>
</script>
</body> </html>
2012-2021 jQuery插件库版权所有
jquery插件
|
jq22工具库
|
网页技术
|
广告合作
|
在线反馈
|
版权声明
沪ICP备13043785号-1
浙公网安备 33041102000314号