单个div+css实现一个项链效果代码

代码语言:html

所属分类:布局界面

代码描述:单个div+css实现一个项链效果代码

代码标签: 单个 div css 项链

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

<!DOCTYPE html>

<html lang="en">

<head>

    <meta charset="UTF-8">



    <style>
        body {
          min-height: 300px;
          height: 100vh;
          position: relative;
          background-color: #dc143c;
        }
        div {
          position: absolute;
          left: 50%;
          top: 50%;
        }
        div::before,
        div::after {
          display: block;
          content: '';
          position: absolute;
        }
        #forever {
          width: 28px;
          height: calc(100% - 100px);
          margin-left: -14px;
          top: -20%;
          background: radial-gradient(circle, #ccc 50%, rgba(204,204,204,0) 51%) 79% 0/0.3em 0.3em, radial-gradient(circle, rgba(0,0,0,0.3) 40%, rgba(0,0,0,0) 75%) 70% 0.4em/0.3em 0.3em, radial-gradient(circle, rgba(0,0,0,0.2) 40%, rgba(0,0,0,0) 80%) 0 0.3em/0.3em 0.3em;
          background-repeat: repeat-y;
        }
        #forever::before {
          width: 60px;
          height: 100px;
          left: -5px;
          bottom: -85px;
          border-radius: 2em 2em 0.1em 0.1em;
          background: radial-gradient(circle, #800000 40%, rgba(128,0,0,0) 41%) 78.5% 10%/0.9em 0.9em, radial-gradient(circle, rgba(255,255,255,0.5) 40%, rgba(255,.........完整代码请登录后点击上方下载按钮下载查看

网友评论0