css实现一个相机拍照输出照片效果代码

代码语言:html

所属分类:布局界面

代码描述:css实现一个相机拍照输出照片效果代码,点右上角按钮试试。

代码标签: css 相机 拍照 照片

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

<!DOCTYPE html>

<html lang="en">

<head>

    <meta charset="UTF-8">






    <style>
        body {
          display: flex;
          align-items: center;
          justify-content: center;
          height: 100vh;
          background-color: #04a5b2;
          overflow: hidden;
        }
        
        .polaroid-camera {
          position: relative;
          top:-50px;
        }
        
        .polaroid-camera:before, .polaroid-camera:after {
          content:"";
          position: absolute;
          transform: translate(-50%,-50%);
          left:0;
          top:50%;
          background-color: #faedcd;
          width:300px;
        }
        
        .polaroid-camera:before {
          border-radius: 30px 30px 0 0;
          box-shadow: inset 0 45px #fefae0;
          height:150px;
        }
        
        .polaroid-camera:after {
          height:40px;
          top:-10px;
        }
        
        button {
          position: absolute;
          width:50px;
          height:20px;
          transition: .2s;
          border-radius: 10px 10px 0 0;
          background-color: #003049;
          border: none;
          top:-95px;
          left:50px;
          transform-origin: bottom;
          cursor: pointer;
          z-index:125;
        }
        
        button:active {
          transform: scaleY(.5);
        }
        
        .lens {
          position: absolute;
          border-radius:50%;
          border:5px solid #333;
          background-color: white;
          width:115px;
          height:115px;
          z-index:1;
          transform: translate(-50%,-50%);
          top:50%;
          left:0;
        }
        
        .lens:before, .lens:after {
          content:"";
          position: absolute;
          border-radius:50%;
          transform: translate(-50%,-50%);
          top:50%;
          left:50%;
       .........完整代码请登录后点击上方下载按钮下载查看

网友评论0