css-doodle实现钻石随机填充布局效果

代码语言:html

所属分类:布局界面

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


<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">

<style>
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

.container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  background-color: #262546;
}

css-doodle {
  cursor: pointer;
}
</style>

</head>
<body translate="no">
<div class="container">
<div class="container__elements">
<css-doodle>
:doodle {
@grid: 100x100;
@size: 45vmax;
@shape: diamond;
grid-gap: 1px;
}
@shape: @.........完整代码请登录后点击上方下载按钮下载查看

网友评论0