div+css布局智能手表代码

代码语言:html

所属分类:布局界面

代码描述:div+css布局智能手表代码

代码标签: div css 布局 智能 手表 代码

下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开

<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width,initial-scale=1.0,maximum=1.0,minimum=1.0,user-scalable=0" />

     <style>

.container {
  --bg: #fdfcf0;
  --titanium: #d1d5db;
  --titanium-light: #f9fafb;
  --titanium-dark: #9ca3af;
  --screen-bg: #fffef2;
  --ring-red: #ff3b30;
  --ring-green: #34c759;
  --ring-blue: #007aff;
  --banana: #eab308;
  --banana-light: #fef9c3;
  --text-main: #1c1c1e;
  --text-dim: #8e8e93;
  --case-shadow: rgba(0, 0, 0, 0.15);

  --watch-w: 310px;
  --watch-h: 375px;
  --ease: cubic-bezier(0.2, 1, 0.2, 1);

  margin: 0;
  min-height: 100vh;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  background-image: radial-gradient(
      circle at 10% 10%,
      #fef9c3 0%,
      transparent 40%
    ),
    radial-gradient(circle at 90% 90%, #fef08a 0%, transparent 40%);
  font-family:
    "Inter",
    -apple-system,
    sans-serif;
  overflow: hidden;
  user-select: none;
}

.container input[type="radio"] {
  display: none;
}

.watch-container {
  position: relative;
  width: var(--watch-w);
  height: var(--watch-h);
  perspective: 2000px;
}

.strap {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 148px;
  height: 180px;
  background: #e2e4e9;
  border-radius: 18px;
  z-index: 1;
  box-shadow: inset 0 0 50px rgba(0, 0, 0, 0.08);
}
.strap.top {
  top: -150px;
  background: linear-gradient(to top, #e2e4e9, #f3f4f6);
}
.strap.bottom {
  bottom: -150px;
  background: linear-gradient(to bottom, #e2e4e9, #f3f4f6);
}

.watch-case {
  position: relative;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    145deg,
    var(--titanium-light),
    var(--titanium),
    var(--titanium-dark)
  );
  border-radius: 68px;
  z-index: 10;
  box-shadow:
    0 60px 100px var(--case-shadow),
    inset 0 1px 1px rgba(255, 255, 255, 0.9),
    inset 0 -3px 10px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  box-sizing: border-box;
  border: 1px solid #c2c6cc;
}

.crown-well {
  position: absolute;
  right: -2px;
  top: 55px;
  width: 12px;
  height: 90px;
  background: rgba(0, 0, 0, 0.15);
  border-radius: 10px;
  z-index: 8;
  box-shadow: inset 2px 0 5px rgba(0, 0, 0, 0.2);
}

.crown {
  position: absolute;
  right: -12px;
  top: 75px;
  width: 20px;
  height: 50px;
  background: linear-g.........完整代码请登录后点击上方下载按钮下载查看

网友评论0