单个div+css实现插在石头中的宝剑效果代码

代码语言:html

所属分类:布局界面

代码描述:单个div+css实现插在石头中的宝剑效果代码

代码标签: 单个 div css 插在 石头 宝剑

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

<!DOCTYPE html>

<html lang="en">

<head>

    <meta charset="UTF-8">



    <style>
        body {
          min-height: 400px;
          height: 100vh;
          position: relative;
          background-color: #2f4f4f;
        }
        div {
          position: absolute;
          left: 50%;
          top: 50%;
        }
        div::before {
          display: block;
          content: '';
          position: absolute;
        }
        #mythical {
          width: 250px;
          height: calc(100% - 50px);
          margin-left: -125px;
          top: 0;
          background: linear-gradient(to bottom, rgba(255,255,255,0.3), rgba(255,255,255,0.05) 70%) 79% 0/0.5em 100%, linear-gradient(to bottom, rgba(255,255,255,0.2), rgba(255,255,255,0.05) 80%) 80% 0/2em 100%, linear-gradient(to bottom, rgba(255,255,255,0.3), rgba(255,255,255,0.05) 70%) 60% 0/1em 100%, linear-gradient(to bottom, rgba(255,255,255,0.3), rgba(255,255,255,0.05) 70%) 26% 0/0.5em 100%, linear-gradient(to bottom, rgba(255,255,255,0.3), rgba(255,255,255,0.05) 70%) 25% 0/3em 100%, linear-gradient(to bottom, rgba(255,255,255,0.4), rgba(255,255,255,0.05) 80%) 12% 0/0.5em 100%, linear-gradient(to bottom, rgba(255,255,255,0.4), rgba(255,255,255,0.05) 80%) 90% 0/0.5em 100%, linear-gradient(to bottom, rgba(255,255,255,0.1), rgba(255,255,255,0.05) 20%) 47% 0/1.8em 100%;
          background-repeat: no-repeat;
        }
        #mythical::before {
          width: 100%;
          height: 300px;
          bottom: 0;
          background: radial-gradient(circle, #f0f 25%, rgba(255,0,255,0) 25.5%) 50% 34.5%/1em 1em, linear-gradient(135deg, rgba(255,255,255,0) 70%, white 70.2%) 46.8% 31.5%/1em 1em, linear-gradient(-135deg, rgba(255,255,255,0) 70%, white 70.2%) 53.3% 31.5%/1em 1em, linear-gradient(45deg, rgba(255,255,255,0) 70%, white 70.2%) 46.8% 37%/1em 1em, linear-gradient(-45deg, rgba(255,255,255,0) 70%, white 70.2%) 53.3% 37%/1em 1em, radial-gradient(circle, #daa520 43%, rgba(218,165,32,0) 43.5%) 32% 33.3%/1em 1em, radial-gradient(circle, #daa520 43%, rgba(218,165,32,0) 43.5%) 68% 33.3%/1em 1em, linear-gradient(#daa520, #daa520) 50% 34%/5em 0.3em, radial-gradient(circle, #daa520 50%, rgba(218,165,32,0) 50.5%) 50% 4%/1em 1em, linear-gradient(95deg, rgba(218,165.........完整代码请登录后点击上方下载按钮下载查看

网友评论0