div+css实现大碗字母汤汁点击导航效果代码
代码语言:html
所属分类:菜单导航
代码描述:div+css实现大碗字母汤汁点击导航效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en" > <head> <meta charset="UTF-8"> <style> * { box-sizing: border-box; scroll-behavior: smooth; } body { background: linear-gradient( to bottom, #ccc, #fff 40vh, #ccc 40.5vh, #333 110vh, #555 110vh, #333 150vh ); } h1 { text-align: center; margin: 2rem auto; font-weight: 100; text-transform: uppercase; letter-spacing: 2px; } .bowl { --rim-width: 10px; width: 90%; min-height: 65vh; max-width: 1000px; border-radius: 50%; border: var(--rim-width) solid #ccc; background: linear-gradient(to bottom, #333, #ececec); margin: 1rem auto 35vh; position: relative; .bowl__inner { overflow: hidden; width: 100%; height: 100%; border-radius: 50%; position: absolute; } &:after { content: ""; width: calc(100% + (var(--rim-width) * 2)); left: calc(var(--rim-width) * -1); height: 55vh; border-radius: 0 0 45vh 45vh; background: linear-gradient(120deg, #ccc, #fff, #cecece, #000); display: block; top: 50%; position: absolute; z-index: -1; } } .soup { background: #f00; background: radial-gradient(circle at 10% 10%, #ff4d4d 0%, #b30000 100%); width: 100%; height: 100%; border-radius: 50%; display: block; position: absolute; top: 3rem; } .soup__nav { color: #f6e7b5; position: absolute; display: flex; align-items: center; justify-content: center; gap: 1rem; flex-wrap: wrap; width: 75%; height: 66%; top: 30%; left: 50%; transform: translate(-50%, -50%) rotateX(75deg); font-size: 4.5rem; perspective: 1200px; /* stronger perspective */ perspective-origin: center 20%; a { color: inherit; text-decoration: none; font-w.........完整代码请登录后点击上方下载按钮下载查看
网友评论0