div+css实现画卷拖动卷开效果代码

代码语言:html

所属分类:拖放

代码描述:div+css实现画卷拖动卷开效果代码,无js代码,通过css与div实现。

代码标签: div css 画卷 拖动 卷开

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

<!DOCTYPE html>

<html lang="en">

<head>

    <meta charset="UTF-8">



    <style>
        * {
          box-sizing: border-box;
        }
        
        ::-webkit-resizer {
          border: 1px solid black;
          border-radius: 50%;
          background: #9c874c;
          box-shadow: 2px 2px 2px black inset;
        }
        
        @font-face {
          font-family: "Unifraktur Cook";
          src: url("//repo.bfw.wiki/bfwrepo/fonts/UnifrakturCook-Bold.ttf");
        }
        body {
          margin: 0;
          width: 100vw;
          min-height: 100vh;
          font-family: "Unifraktur Cook", cursive, sans-serif;
        }
        
        .container {
          overflow: hidden;
          width: 100%;
          height: 100%;
          min-height: 100vh;
          display: flex;
          flex-direction: column;
          align-items: center;
          justify-content: flex-end;
          position: relative;
          background: black;
          padding: 40px 0;
        }
        .container:before {
          content: "";
          position: absolute;
          left: 0;
          top: 0;
          width: 100%;
          height: 100%;
          background-image: url("//repo.bfw.wiki/bfwrepo/images/building/tt1.png");
          opacity: 0.35;
          background-position: center;
        }
        
        .title {
          height: 80px;
          box-shadow: 0px 0px 7px -2px rgba(0, 0, 0, 0.24) inset;
          overflow: hidden;
          resize: horizontal;
          max-width: 500px;
          min-width: 180px;
          border-radius: 10px 2px 10px 2px;
          container-type: inline-size;
          container-name: title;
          margin-bottom: 15px;
        }
        .title:after, .title:before {
          content: "";
          position: absolute;
          width: 40px;
          height: 100%;
          top: 0;
          filter: brightness(0.75);
          z-index: 2;
        }
        .title:before {
          right: 0;
          box-shadow: -2px -1px 7px rgba(0, 0, 0, 0.35), 0px 0px 100px 30px rgba(0, 0, 0, 0.05), -20px 27px 60px 20px rgba(199, 186, 153, 0.2), 0 0 24px rgba(205, 138, 71, 0.2) inset;
        }
        .title:after {
          left: 0;
          box-shadow: 2px -1px 7px rgba(0, 0, 0, 0.35), 0px 0px 100px 30px rgba(0, 0, 0, 0.05), 20px 27px 60px 20px rgba(199, 186, 153, 0.2.........完整代码请登录后点击上方下载按钮下载查看

网友评论0