css布局实现桌子碗筷子效果代码

代码语言:html

所属分类:布局界面

代码描述:css布局实现桌子碗筷子效果代码

代码标签: 桌子 筷子 效果

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


<!DOCTYPE html>
<html lang="en" >

<head>

  <meta charset="UTF-8">

  
  
  
<style>
:root {
  --sushi-table-background: #d9801c;
  --sushi-table-texture: url("//repo.bfw.wiki/bfwrepo/image/605023423d101.png");
}

* {
  box-sizing: border-box;
}

body {
  background-color: salmon;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.sushi-table {
  width: 600px;
  height: 600px;
  background-color: var(--sushi-table-background);
  background-image: var(--sushi-table-texture);
  border-radius: 50%;
  border: 10px solid gold;
  display: grid;
  grid-template-columns: repeat(9, 1fr);
  grid-template-rows: repeat(9, 1fr);
}

.sushi-one {
  width: 125px;
  height: 125px;
  border-radius: 50%;
  justify-self: center;
  align-self: center;
  background-color: #ffffff;
  border: 5px solid #4d5125;
  background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm23-11c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-6 60c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm29 22c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zM32 63c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm57-13c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-9-21c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM60 91c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM35 41c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM12 60c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2z' fill='%23ebe8f0' fill-opacity='0.4' fill-rule='evenodd'/%3E%3C/svg%3E");
}

.one {
  grid-column: 4 / span 3;
  grid-row: 4 / span 3;
  position: relative;
}

.two {
  grid-row: 2 / span 2;
  grid-column: 4 / span 3;
  position: relative;
}

.three {
  grid-column: 2 / span 2;
  grid-row: 4 / span 3;
  position: relative;
}

.four {
  grid-column: 7 / span 2;
  grid-row: 4 / span 3;
  position: relative;
}

.five {
  grid-column: 4 / span 3;
  grid-row: 7 / span 2;
  position: relative;
}

.six {
  grid-column: 2 / span 3;
  grid-row: 2 / span 3;
  position: relative;
}

.seven {
  grid-column: 6 / span 3;
  grid-row: 2 / span 3;
  position: relative;
}
.eight {
  grid-column: 2 / span 3;
  grid-row: 6 / span 3;
  position: relative;
}
.nine {
  grid-column: 6 / span 3;
  grid-row: 6 / span 3;
  position: relative;
}

.mango {
  margin: 0 auto;
  position: absolute;
  left: 55px;
  top: 25px;
  widt.........完整代码请登录后点击上方下载按钮下载查看

网友评论0