css实现自适应带夜晚模式切换的房产落地页效果代码

代码语言:html

所属分类:响应式

代码描述:css实现自适应带夜晚模式切换的房产落地页效果代码

代码标签: css 自适应 夜晚 模式 切换 房产 落地页

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

<!DOCTYPE html>

<html lang="en">

<head>

    <meta charset="UTF-8">

    <link type="text/css" rel="stylesheet" href="//repo.bfw.wiki/bfwrepo/css/font-awesome-4.7.0/css/font-awesome.min.css">
    <style>
        @import url("https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap");
        
        .light-theme {
          --black-color: #000;
          --grey-color: #b5b2b2;
          --grey-color-200: #9e9e9e;
          --grey-border: #e4dfdd;
          --grey-border-200: rgba(149, 146, 146, 0.32);
          --text-color: rgba(0, 0, 0, 0.5);
          --white-color: #fff;
          --green-color: #88ffc6;
        }
        
        .dark-theme {
          --black-color: #fff;
          --text-color: rgba(255, 255, 255, 0.5);
          --white-color: #000;
          --green-color: #88ffc6;
        }
        
        .d-flex {
          display: flex;
          display: -webkit-flex;
        }
        .flex-wrap {
          flex-wrap: wrap;
          -webkit-flex-wrap: wrap;
        }
        .justify-content-between {
          justify-content: space-between;
          -webkit-justify-content: space-between;
        }
        .align-items-center {
          align-items: center;
          --webkit-align-items: center;
        }
        ul,
        ol {
          list-style: none;
          padding: 0px;
          margin: 0px;
          transition: all 1.2s;
          -webkit-transition: all 1.2s;
        }
        .img-fluid {
          max-width: 100%;
          height: auto;
        }
        
        * {
          margin: 0px;
          padding: 0px;
          box-sizing: border-box;
        }
        body {
          font-family: "Montserrat", sans-serif;
          font-size: 16px;
          line-height: 30px;
        }
        h1 {
          font-size: 91px;
          line-height: 110px;
          font-weight: 700;
          text-transform: uppercase;
          transition: all 1.2s;
          -webkit-transition: all 1.2s;
        }
        h2 {
          font-size: 52px;
          line-height: 62px;
          font-weight: 800;
          transition: all 1.2s;
          -webkit-transition: all 1.2s;
        }
        a {
          text-decoration: none;
          transition: all 1.2s;
          -webkit-transition: all 1.2s;
        }
        img,
        p,
        span,
        li {
          transition: all 1.2s;
          -webkit-transition: all 1.2s;
        }
        
        .banner {
          height: 100vh;
          overflow: hidden;
          min-height: 820px;
          justify-content: space-between;
          -webkit-justify-content: space-between;
          padding: 0px 40px;
          position: relative;
        }
        .banner::after {
          content: "";
          position: absolute;
          transition: all 1s;
          -webkit-transition: all 1s;
          top: 0;
          right: 0%;
          width: 0%;
          background: #000;
          height: 100%;
        }
        .dark-theme .banner::after {
          content: "";
          width: 100%;
        }
        
        .banner-left {
          width: 70%;
          position: relative;
          z-index: 1;
        }
        .banner-left h1 {
          margin-bottom: 0px;
          position: relative;
          color: var(--black-color);
        }
        .dark-theme .banner-left h1 {
          color: #000;
          text-shadow: 0px 0px 2px #88ffc6;
        }
        .banner-left h1::before {
          content: "";
          position: absolute;
          top: 50%;
          transform: translateY(-50%);
          -webkit-transform: translateY(-50%);
          left: -40px;
          width: 10px;
          background: var(--green-color);
          height: 100%;
        }
        
        .inner-desc {
          margin-top: 58px;
          max-width: 1000px;
        }
        .inner-desc form {
          margin-top: 51px;
        }
        .banner-left p {
          text-transform: uppercase;
          color: var(--text-color);
        }
        
        .switch {
          margin-bottom: 20px;
          background: rgba(0, 0, 0, 0.1);
          position: relative;
          border-radius: 50px;
          width: 200px;
          transition: all 1.2s;
          -webkit-transition: all 1.2s;
        }
        .switch.checked {
          background: #34323d;
        }
        .switch::before {
          content: "";
          position: absolute;
          left: 0;
          top: 0;
          width: 50%;
          height: 100%;
          background: #fff;
          border-radius: 50px;
          z-index: 1;
          box-shadow: 0 2px 15px rgba(0, 0, 0, 0.15);
          -webkit-box-shadow: 0 2px 15px rgba(0.........完整代码请登录后点击上方下载按钮下载查看

网友评论0