cqfill使用容器查询拖动改变胡须长度颜色效果代码
代码语言:html
所属分类:拖放
代码描述:cqfill使用容器查询拖动改变胡须长度颜色效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <style> * { box-sizing: border-box; } body { min-height: 100vh; overflow: hidden; background: #e6e6e6; } .resizable-container { min-height: 220px; max-height: 450px; min-width: 200px; max-width: 400px; width: 200px; resize: both; overflow: hidden; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -100px); contain: layout size; --css-contain: layout size; } .resizable-container:active .arrow { display: none; } .arrow { position: absolute; bottom: 0; right: 0; width: 26px; transform: translate(-50%, 0) rotate(-45deg) scale(0.75); -webkit-animation: bounce 0.5s infinite linear; animation: bounce 0.5s infinite linear; } .arrow > path { fill: #df4020; stroke: #000; stroke-width: 20px; } .beardy { width: 200px; position: absolute; top: 0%; left: 50%; transform: translate(-50%, 0%); overflow: visible !important; } .beardy__grow { height: var(--length,32px); transition: height 0.25s, fill 0s; } .beardy__beard { fill: hsl(30, 50%, calc(var(--lightness, 15) * 1%)); } .beardy__eye { transform-origin: 50% 110px; -webkit-animation: blink 8s infinite linear; animation: blink 8s infinite linear; } .beardy__brow { opacity: var(--brow,0); stroke-width: 4px; } @container (min-height: 250px) { .beardy { --length: 50px; } } @container (min-height: 300px) { .beardy { .........完整代码请登录后点击上方下载按钮下载查看
网友评论0