css-doodle实现鲜花铺满方块效果代码

代码语言:html

所属分类:布局界面

代码描述:css-doodle实现鲜花铺满方块效果代码

代码标签: css-doodle 鲜花 铺满 方块

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

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

<head>
  <meta charset="UTF-8">
  


  
  
<style>
html,
body {
  height: 100%;
  margin: 0;
}

body {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #eaddbd;
  overflow: hidden;
}

graph {
  position: relative;
  padding: 8vmin;
  background: #fbf1da;
  box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.1), 0 6px 20px 0 rgba(0, 0, 0, 0.1);
  border-radius: 4px;
}
</style>

  
  
  
</head>

<body translate="no">
  <graph>
  <css-doodle click-to-update>
    :doodle {
      @grid: 22 / 70vmin 70vmin;
      @max-size: 800px 800px;
      background: #475d50;
      border-radius: 4px;
      overflow: visible;
      contain: initial;
    }

    --c: @p(#e8aa3e, #d7e2eb, #dcc6f5); 
    @place-cell: center;

    @random(0.7) {
      z-index: 1;

      :after {
        content: "";
        transform: translate(@m2(@r(±36vmin))) rotate(@r(360deg));
        @size: 6vmin;
        background: @doodle(
          @grid: 3x4 / 100% 100%;
          @size: 20%;
          @place-cell: center;
          border-radius: 0 100% 0 100%;
      .........完整代码请登录后点击上方下载按钮下载查看

网友评论0