div+css实现房间主题风格ui页面布局效果代码
代码语言:html
所属分类:布局界面
代码描述:div+css实现房间主题风格ui页面布局效果代码,悬浮导航菜单有立体凹凸效果,开关也是仿造房间的开关、甚至窗体都能像门一样打开。
代码标签: div css 房间 主题 风格 ui 页面 布局
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en" > <head> <meta charset="UTF-8"> <style> @import url('https://fonts.googleapis.com/css2?family=Sometype+Mono:ital,wght@0,400;0,700;1,400;1,700&display=swap'); :root { --bg: #fef5b9; --box: #fced97; --light: #fffbaf; --dark: #825a48; --body: #251418; --alt: #918d61; } * { box-sizing: border-box; } ::selection { background: var(--body); color: var(--bg); } html { overflow-x: hidden; } body { margin: 0; padding: 0 0 20px 0; position: relative; background: var(--bg); color: var(--body); width: 100%; min-height: 100vh; font-family: 'Sometype Mono', monospace; background-image: url("https://assets.codepen.io/5896374/seamless-yellow-carpet.jpg"); overflow-x:hidden; transition: all 0.3s steps(3); } body::before { content: ""; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: black; z-index: 999; opacity: 0; pointer-events: none; transition: inherit; } body.toggled::before { opacity: 0.5; mix-blend-mode: color-burn; } main { display: flex; flex-wrap: wrap; width: 1050px; margin: auto; max-width: 100%; } .box { margin: auto; max-width: 100%; display: grid; padding: 20px; position: relative; border-radius: 10px; border: 2px solid; background: var(--box); box-shadow: 5px 5px 3px inset rgba(255, 255, 255, 0.65), 5px 10px 10px 5px inset var(--light), -6px -6px 1px inset var(--dark), 3px 3px 0 rgba(0, 0, 0, 0.1), 5px 5px 0 rgba(0, 0, 0, 0.1), 7px 7px 0 rgba(0, 0, 0, 0.1), 9px 9px 0 rgba(0, 0, 0, 0.1); } .box-wrap { position: relative; } .main-box { width: 300px; min-height: 300px; max-width: 92%; margin: 20px auto; } .box::after { content: ""; position: absolute; top: 0; left: 0; height: 100%; width: 100%; z-index: 1; border-radius: inherit; pointer-events: none; } .box-inn.........完整代码请登录后点击上方下载按钮下载查看
网友评论0