【问题标题】:Background image appearing between content on zooming in放大时出现在内容之间的背景图像
【发布时间】:2019-04-02 19:47:18
【问题描述】:

我有这张我想要的图像作为索引页的背景。但是,当我放大背景图像时,它会出现在表单字段之间,而不是像它应该出现在表单后面。索引页的body 包含一个ma​​in 元素,该元素由一个aside 元素和一个section 组成。 部分包含两种形式,一种用于登录,另一种用于注册,并带有两个按钮。为清楚起见,请查看下面给出的代码。

1) 我面临的主要问题是当我放大时,大约在 400% 左右或超过 400%。放大时,背景图像出现在登录表单(活动)的“电子邮件”和“密码”字段之间。我希望背景图像实际上位于背景中,并保持在 ma​​in 的所有内容之后 标记,即基本上在整个表单和旁边的图像后面。

2) 此外,当您放大时,您可能会注意到登录或注册按钮不会出现在表单的末尾,而是出现在中间,下方有一个大的空白区域。我希望这些按钮在放大时位于表单的最底部。

3) 最后,人们可能还会注意到我在 side 标签中使用的 svg 图像的上部在放大和重新定位时是如何被切断的。这样,当放大时,svg 下方的介绍文本也会出现在“LOGIN”和“SIGN UP”锚标记的后面。如果它们全部不重叠或不被裁剪会更好。

P.S.- 我使用了内联 svg。因此,请跳过或折叠较长的 svg 代码,以免感到痛苦。(*对于可以建议如何在动画工作中使用外部 svg 的人来说,Brownie 点数。我尝试过 objectembed img 但无济于事*)。

您可以使用任何下载的图像作为背景,只需将其放在 img 文件夹中并将其命名为“bg-index.jpeg”。

HTML/JSP

<!DOCTYPE html>
<html lang="en" >

<head>
    <title>Login << Exam Nation</title>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0"> 
    <meta name="description" content="Take an Exam--Test Yourself | Exam Nation " />
    <meta name="keywords" content="exam nation, online examination system, log in, sign up, index, default page, fallback page" />
    <meta name="author" content="Akash Das" />
<!--===============================================================================================-->  
    <script src="https://use.typekit.net/lkh0ago.js"></script>
<!--===============================================================================================-->  
    <script>try{Typekit.load({ async: true });}catch(e){}</script>
<!--===============================================================================================-->
    <link rel="shortcut icon" href="img/icons/favicon.ico" type="image/x-icon">
<!--===============================================================================================-->      
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/meyer-reset/2.0/reset.min.css">
<!--===============================================================================================-->  
    <link rel="stylesheet" href="css/style.css">
<!--===============================================================================================-->  
</head>

<!--style="background: url(img/bg-index.jpeg) no-repeat center center fixed; background-size: cover; height: 100%; overflow: hidden;"-->
<body>

<main ontouchstart class="with-hover">
    <aside>
        <div></div>
        <svg viewBox="0 0 100 100">
        <g stroke="#fff" stroke-width="3" fill="none" stroke-linecap="round" stroke-linejoin="round">
            <path d="M65.892702,73 C70.3362168,68.5836139 73.0845878,62.4824333 73.0845878,55.7432553 C73.0845878,49.0040774 70.3362168,42.9028968 65.892702,38.4865107 C61.4491873,34.0701246 55.3105288,31.338533 48.5299539,31.338533 C41.749379,31.338533 35.6107205,34.0701246 31.1672058,38.4865107 C26.723691,42.9028968 23.97532,49.0040774 23.97532,55.7432553 C23.97532,62.4824333 26.723691,68.5836139 31.1672058,73 C31.1672058,73 65.892702,73 65.892702,73 Z M73.0594097,62.3985471 C76.4680437,61.2200182 88.5607213,56.1793944 85.5117743,37.8371245 L81.6924976,37.9360303 C80.8526284,43.134546 77.152648,46.6051883 72.4845099,46.6051883 M24.4062209,60.319036 C24.3904842,60.3191058 24.3747393,60.3191408 24.3589862,60.3191408 C18.6378761,60.3191408 14,55.70958 14,50.0233985 C14,44.3372171 18.6378761,39.7276563 24.3589862,39.7276563 C26.0569266,39.7276563 27.6594543,40.133673 29.0736464,40.8533508 M65.8946819,38.4867877 L31.1652244,38.4844448 M37.6782363,44.9577899 C34.9010396,47.7180312 33.1833077,51.5312691 33.1833077,55.7432553 C33.1833077,59.9552416 34.9010396,63.7684794 37.6782363,66.5287208 M45.4606247,29.0505903 L51.5992831,29.0505903 M48.5299539,26 L48.5299539,31.338533"></path>
        </g>
    </svg>
        <div>
            <p id="intro-signup"><br/>Be a citizen of&nbsp;<strong>Exam Nation</strong> with&nbsp;an&nbsp;account.</p>
            <p id="intro-login" class="active"><br/>Welcome back to<br/><strong>Exam Nation</strong>!</p>
        </div>
    </aside>
    <section>
        <h1>
            <a id="link-login" class="active">Login</a>
            <a id="link-signup">Register</a>
        </h1>
        <form id="form-signup" action="test1.html" method="POST">
            <div>
                <fieldset>
                    <div>
                        <label for="name">Name</label>
                        <input id="name" name="name" type="text" placeholder="Full Name" required/>
                    </div>
                </fieldset>
                <fieldset>
                    <div>
                        <label for="email">Email</label>
                        <input id="email" name="email" type="email" placeholder="abc@xyz.com" required/>
                    </div>
                </fieldset>
                <fieldset>
                    <div>
                        <label for="password">Password</label>
                        <input id="password" name="password" type="password" placeholder="••••••••" required/>
                    </div>
                </fieldset>
            </div>

            <ul>
                <li>
                    <button class="fb">Connect with Facebook</button>
                </li>
                <li>
                    <button class="tw">Connect with Twitter</button>
                </li>
            </ul>

            <input type="submit" value="Sign Up"/>
        </form>
        <form id="form-login" class="active" action="test2.html" method="POST">
            <div>
                <fieldset>
                    <div>
                        <label for="email">Email</label>
                        <input id="email" name="email" type="email" placeholder="abc@xyz.com" required/>
                    </div>
                </fieldset>
                <fieldset>
                    <div>
                        <label for="password">Password</label>
                        <input id="password" name="password" type="password" placeholder="••••••••" required/>
                    </div>
                </fieldset>
            </div>

            <ul>
                <li>
                    <button class="fb">Connect with Facebook</button>
                </li>
                <li>
                    <button class="tw">Connect with Twitter</button>
                </li>
            </ul>

            <input type="submit" value="Log In"/>
        </form>
    </section>
</main>
<!--===============================================================================================-->
    <script src='https://cdnjs.cloudflare.com/ajax/libs/jquery/3.1.1/jquery.min.js'></script>
<!--===============================================================================================-->
    <script  src="js/index.js"></script>
<!--===============================================================================================-->
</body>

</html>

CSS

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}

*:focus {
  outline: none !important;
}

body, html {
  height: 100%;
}

body {
  background: url(../img/bg-index.jpeg) no-repeat center center;
  background-size: cover;
  height: 100%;
  overflow: auto;
  margin: 0;
  font-family: "brandon-grotesque", "Brandon Grotesque", "Source Sans Pro", "Segoe UI", Frutiger, "Frutiger Linotype", "Dejavu Sans", "Helvetica Neue", Arial, sans-serif;
  color: #857567;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

main {
  background: white;
  height: 100%;
}
main aside {
  position: relative;
  display: flex;
  flex-flow: row wrap;
  align-items: center;
  align-content: center;
  justify-content: center;
  height: calc(100% / 3);
  padding: 12px;
  background: #DFB72C url("../img/table-pc.jpg") no-repeat center center/cover;
}
.
.
.
main aside svg {
  position: relative;
  margin-top: -24px;
  width: 120px;
  height: 120px;
}
main aside p {
  position: relative;
  width: 100%;
  padding : 5px;
  margin: 0;
  color: white;
  font-size: 22px;
  line-height: 1.2;
  text-align: center;
  text-shadow: 0 0 10px rgba(133, 117, 103, 0.5);
}
main aside p strong {
  font-weight: 700;
}
main section form input[type="submit"] {
  display: block;
  align-self: flex-end;
  -webkit-appearance: none;
     -moz-appearance: none;
          appearance: none;
  width: 100%;
  margin: 0;
  border: 0;
  border-radius: 0;
  font-family: "brandon-grotesque", "Brandon Grotesque", "Source Sans Pro", "Segoe UI", Frutiger, "Frutiger Linotype", "Dejavu Sans", "Helvetica Neue", Arial, sans-serif;
  font-size: 24px;
  text-transform: capitalize;
  line-height: 2;
  background: #DFB72C;
  color: white;
  cursor: pointer;
}
.
.
.
@media only screen and (min-width: 624px) {
  body {
    display: flex;
    align-items: center;
    align-content: center;
    justify-content: center;
    background: url(../img/bg-index.jpeg) no-repeat center center;
    background-size: cover;
    height: 100%;
    overflow: auto;
  }

  main {
    display: flex;
    border-radius: 2px;
    overflow: hidden;
    height: 100%;
    max-height: 370px;
    box-shadow: 0 0 10px rgba(56, 54, 53, 0.5);
  }

截图

一个。没有缩放的登录页面 b. 500% 缩放的登录页面 c。 400% 缩放的登录页面 d。 500% 缩放登录按钮后的白色奇怪空间 e。放大时,介绍文本位于 LOGIN & REGISTER 锚点后面。 svg 图片被截断。

编辑:- 对于完整的 CSS 代码(减去 webkit-keyframes),请参阅下面的答案。我还附上了背景图片。

【问题讨论】:

  • 我只能在 Firefox 中重现该问题,但您有一些负边距顶部(例如在主边 div:not(:empty) 上),以及边的固定高度使背景出现。
  • @StevenKuipers 感谢您的洞察力。您能否借助一些代码为上述背景问题提出一个可行的解决方案?
  • @StevenKuipers 如果你能让我知道如何解决提交按钮(登录和注册)按钮未出现在末尾的问题,那将是蜜汁糖浆放大的表格。当缩放为 500% 时,这看起来很奇怪

标签: html css jsp svg sass


【解决方案1】:

这是完整的 CSS 代码。我已达到问题的字数限制。

CSS

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}

*:focus {
  outline: none !important;
}

body, html {
  height: 100%;
}

body {
  background: url(../img/bg-index.jpeg) no-repeat center center;
  background-size: cover;
  height: 100%;
  overflow: auto;
  margin: 0;
  font-family: "brandon-grotesque", "Brandon Grotesque", "Source Sans Pro", "Segoe UI", Frutiger, "Frutiger Linotype", "Dejavu Sans", "Helvetica Neue", Arial, sans-serif;
  color: #857567;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

main {
  background: white;
  height: 100%;
}
main aside {
  position: relative;
  display: flex;
  flex-flow: row wrap;
  align-items: center;
  align-content: center;
  justify-content: center;
  height: calc(100% / 3);
  padding: 12px;
  background: #DFB72C url("../img/table-pc.jpg") no-repeat center center/cover;
}
main aside div:empty {
  opacity: 0.5;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #DFB72C url("../img/table-pc.jpg") no-repeat center center/cover;
  background-blend-mode: screen;
}
main aside svg {
  position: relative;
  margin-top: -24px;
  width: 120px;
  height: 120px;
}
main aside div:not(:empty) {
  position: relative;
  width: 100%;
  margin-top: -24px;
}
main aside p {
  position: relative;
  width: 100%;
  padding : 5px;
  margin: 0;
  color: white;
  font-size: 22px;
  line-height: 1.2;
  text-align: center;
  text-shadow: 0 0 10px rgba(133, 117, 103, 0.5);
}
main aside p strong {
  font-weight: 700;
}
main aside p:nth-child(2) {
  position: absolute;
  top: 0;
  left: 0;
}
main aside p.active {
  visibility: visible;
  opacity: 1;
  -webkit-transform: none;
          transform: none;
}
main aside p:not(.active) {
  visibility: hidden;
  opacity: 0;
  -webkit-transform: translateY(100px);
          transform: translateY(100px);
}
main section {
  position: relative;
  height: calc(100% / 3 * 2);
}
main section h1 {
  display: flex;
  justify-content: center;
  padding: 18px;
  color: #DFB72C;
  font-size: 22px;
  line-height: 1;
  text-align: center;
  text-transform: uppercase;
}
main section h1 a {
  display: block;
  margin: 0 6px;
  cursor: pointer;
  -webkit-transform: none;
          transform: none;
}
main section h1 a:hover, main section h1 a:focus {
  color: #976a36;
}
main section h1 a:active {
  color: #857567;
}
main section h1 a.active {
  font-weight: 500;
}
main section h1 a:not(.active) {
  font-weight: 300;
}
main section form {
  display: flex;
  flex-flow: row wrap;
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: calc(100% - 40px);
}
main section form > div, main section form > ul {
  width: 100%;
  padding: 6px;
}
main section form fieldset {
  padding: 6px;
}
main section form fieldset div {
  display: flex;
  border-radius: 2px;
  overflow: hidden;
}
main section form fieldset div label {
  display: block;
  margin: 0;
  padding: 6px 9px;
  background: #DFB72C;
  color: white;
  font-size: 16px;
  cursor: pointer;
  line-height: 25px;
}
main section form fieldset div input {
  display: block;
  background: white;
  border: 1px solid #DFB72C;
  border-left: 0;
  border-radius: 0 2px 2px 0;
  box-shadow: none;
  margin: 0;
  padding: 6px 9px;
  width: 100%;
  color: #857567;
  font-family: "brandon-grotesque", "Brandon Grotesque", "Source Sans Pro", "Segoe UI", Frutiger, "Frutiger Linotype", "Dejavu Sans", "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
}
main section form fieldset div input::-webkit-input-placeholder {
  color: rgba(133, 117, 103, 0.4);
}
main section form fieldset div input:-ms-input-placeholder {
  color: rgba(133, 117, 103, 0.4);
}
main section form fieldset div input::-ms-input-placeholder {
  color: rgba(133, 117, 103, 0.4);
}
main section form fieldset div input::placeholder {
  color: rgba(133, 117, 103, 0.4);
}
main section form fieldset div input:focus {
  background: rgba(233, 226, 213, 0.5);
}
main section form fieldset div input:focus::-webkit-input-placeholder {
  color: rgba(133, 117, 103, 0.6);
}
main section form fieldset div input:focus:-ms-input-placeholder {
  color: rgba(133, 117, 103, 0.6);
}
main section form fieldset div input:focus::-ms-input-placeholder {
  color: rgba(133, 117, 103, 0.6);
}
main section form fieldset div input:focus::placeholder {
  color: rgba(133, 117, 103, 0.6);
}
main section form li {
  padding: 6px;
}
main section form li button {
  display: block;
  margin: 0 auto;
  -webkit-appearance: none;
     -moz-appearance: none;
          appearance: none;
  font-family: "brandon-grotesque", "Brandon Grotesque", "Source Sans Pro", "Segoe UI", Frutiger, "Frutiger Linotype", "Dejavu Sans", "Helvetica Neue", Arial, sans-serif;
  border: 0;
  border-radius: 100px;
  color: white;
  font-size: 16px;
  padding: 6px 12px;
  cursor: pointer;
}
main section form li button.fb {
  background: #3b5998;
}
main section form li button.fb:hover, main section form li button.fb:focus {
  background: #5f7ec1;
}
main section form li button.fb:active {
  background: #263961;
}
main section form li button.tw {
  background: #00aced;
}
main section form li button.tw:hover, main section form li button.tw:focus {
  background: #3bc9ff;
}
main section form li button.tw:active {
  background: #0074a1;
}
main section form input[type="submit"] {
  display: block;
  align-self: flex-end;
  -webkit-appearance: none;
     -moz-appearance: none;
          appearance: none;
  width: 100%;
  margin: 0;
  border: 0;
  border-radius: 0;
  font-family: "brandon-grotesque", "Brandon Grotesque", "Source Sans Pro", "Segoe UI", Frutiger, "Frutiger Linotype", "Dejavu Sans", "Helvetica Neue", Arial, sans-serif;
  font-size: 24px;
  text-transform: capitalize;
  line-height: 2;
  background: #DFB72C;
  color: white;
  cursor: pointer;
}
main section form input[type="submit"]:hover, main section form input[type="submit"]:focus {
  background: #976a36;
}
main section form input[type="submit"]:active {
  background: #857567;
}
main section form.active {
  opacity: 1;
  z-index: 1;
}
main section form.active fieldset, main section form.active li, main section form.active input[type="submit"] {
  -webkit-transform: translateY(0px);
          transform: translateY(0px);
  opacity: 1;
}
main section form:not(.active) {
  opacity: 0;
  z-index: 0;
}
main section form:not(.active) fieldset, main section form:not(.active) li, main section form:not(.active) input[type="submit"] {
  -webkit-transform: translateY(100px);
          transform: translateY(100px);
  opacity: 0;
}
main.with-hover aside p {
  transition: all 250ms ease-out;
}
main.with-hover section h1 a {
  transition: all 150ms ease-out;
}
main.with-hover section h1 a:hover, main.with-hover section h1 a:focus {
  transition: all 300ms ease-out;
}
main.with-hover section h1 a:active {
  transition: all 150ms ease-in;
}
main.with-hover section form {
  transition: all 1000ms ease-out;
}
main.with-hover section form fieldset, main.with-hover section form li, main.with-hover section form input[type="submit"] {
  transition: all 500ms ease-out;
}
main.with-hover section form button, main.with-hover section form input {
  transition: all 150ms ease-out;
}
main.with-hover section form button:hover, main.with-hover section form button:focus, main.with-hover section form input:hover, main.with-hover section form input:focus {
  transition: all 300ms ease-out;
}
main.with-hover section form button:active, main.with-hover section form input:active {
  transition: all 150ms ease-in;
}
main.with-hover section form.active#form-signup fieldset:nth-child(2) {
  transition-delay: 50ms;
}
main.with-hover section form.active#form-signup fieldset:nth-child(3) {
  transition-delay: 100ms;
}
main.with-hover section form.active#form-signup li:nth-child(1) {
  transition-delay: 150ms;
}
main.with-hover section form.active#form-signup li:nth-child(2) {
  transition-delay: 200ms;
}
main.with-hover section form.active#form-signup input[type="submit"] {
  transition-delay: 250ms;
}
main.with-hover section form.active#form-login fieldset:nth-child(2) {
  transition-delay: 50ms;
}
main.with-hover section form.active#form-login li:nth-child(1) {
  transition-delay: 100ms;
}
main.with-hover section form.active#form-login li:nth-child(2) {
  transition-delay: 150ms;
}
main.with-hover section form.active#form-login input[type="submit"] {
  transition-delay: 200ms;
}
main.with-hover section form:not(.active)#form-signup fieldset:nth-child(1) {
  transition-delay: 250ms;
}
main.with-hover section form:not(.active)#form-signup fieldset:nth-child(2) {
  transition-delay: 200ms;
}
main.with-hover section form:not(.active)#form-signup fieldset:nth-child(3) {
  transition-delay: 150ms;
}
main.with-hover section form:not(.active)#form-signup li:nth-child(1) {
  transition-delay: 100ms;
}
main.with-hover section form:not(.active)#form-signup li:nth-child(2) {
  transition-delay: 50ms;
}
main.with-hover section form:not(.active)#form-login fieldset:nth-child(1) {
  transition-delay: 200ms;
}
main.with-hover section form:not(.active)#form-login fieldset:nth-child(2) {
  transition-delay: 150ms;
}
main.with-hover section form:not(.active)#form-login li:nth-child(1) {
  transition-delay: 100ms;
}
main.with-hover section form:not(.active)#form-login li:nth-child(2) {
  transition-delay: 50ms;
}
main.pre-enter aside {
  -webkit-transform-origin: center top;
          transform-origin: center top;
  -webkit-transform: scaleY(0);
          transform: scaleY(0);
  visibility: hidden;
}
main.pre-enter aside svg {
  -webkit-transform-origin: center center;
          transform-origin: center center;
  -webkit-transform: scale(0) rotate(90deg);
          transform: scale(0) rotate(90deg);
  visibility: hidden;
}
main.pre-enter aside p.active {
  opacity: 0;
  -webkit-transform: translateY(100px);
          transform: translateY(100px);
  visibility: hidden;
}
main.pre-enter section h1 a {
  visibility: hidden;
  opacity: 0;
}
main.pre-enter section h1 a:first-child {
  -webkit-transform-origin: right center;
          transform-origin: right center;
  -webkit-transform: translateX(200px) scaleX(0);
          transform: translateX(200px) scaleX(0);
}
main.pre-enter section h1 a:last-child {
  -webkit-transform-origin: left center;
          transform-origin: left center;
  -webkit-transform: translateX(-200px) scaleX(0);
          transform: translateX(-200px) scaleX(0);
}
main.pre-enter section form fieldset, main.pre-enter section form li {
  opacity: 0;
  -webkit-transform: translateY(100px);
          transform: translateY(100px);
  visibility: hidden;
}
main.pre-enter section form input[type="submit"] {
  -webkit-transform-origin: center bottom;
          transform-origin: center bottom;
  -webkit-transform: scaleY(0);
          transform: scaleY(0);
  color: #DFB72C;
  visibility: hidden;
}
main.on-enter aside {
  -webkit-animation: scaleYIn 1000ms linear forwards;
          animation: scaleYIn 1000ms linear forwards;
  visibility: visible;
}
main.on-enter aside svg {
  -webkit-animation: bounceIn-rotate 1000ms linear forwards 250ms;
          animation: bounceIn-rotate 1000ms linear forwards 250ms;
  visibility: visible;
}
main.on-enter aside p.active {
  -webkit-animation: slideInUp-fadeIn 1000ms linear forwards 500ms;
          animation: slideInUp-fadeIn 1000ms linear forwards 500ms;
  visibility: visible;
}
main.on-enter section h1 a {
  visibility: visible;
}
main.on-enter section h1 a:first-child {
  -webkit-animation: scaleX-slideInRight 1000ms linear forwards 750ms;
          animation: scaleX-slideInRight 1000ms linear forwards 750ms;
}
main.on-enter section h1 a:last-child {
  -webkit-animation: scaleX-slideInLeft 1000ms linear forwards 750ms;
          animation: scaleX-slideInLeft 1000ms linear forwards 750ms;
}
main.on-enter section form fieldset, main.on-enter section form li {
  -webkit-animation: slideInUp-fadeIn 1000ms linear forwards;
          animation: slideInUp-fadeIn 1000ms linear forwards;
  visibility: visible;
}
main.on-enter section form fieldset:nth-child(1) {
  -webkit-animation-delay: 1250ms;
          animation-delay: 1250ms;
}
main.on-enter section form fieldset:nth-child(2) {
  -webkit-animation-delay: 1350ms;
          animation-delay: 1350ms;
}
main.on-enter section form fieldset:nth-child(3) {
  -webkit-animation-delay: 1450ms;
          animation-delay: 1450ms;
}
main.on-enter section form li:nth-child(1) {
  -webkit-animation-delay: 1550ms;
          animation-delay: 1550ms;
}
main.on-enter section form li:nth-child(2) {
  -webkit-animation-delay: 1650ms;
          animation-delay: 1650ms;
}
main.on-enter section form input[type="submit"] {
  -webkit-animation: scaleYIn 1000ms linear forwards 1750ms, lemon-white 250ms linear forwards 2150ms;
          animation: scaleYIn 1000ms linear forwards 1750ms, lemon-white 250ms linear forwards 2150ms;
  visibility: visible;
}

@media only screen and (min-width: 624px) {
  body {
    display: flex;
    align-items: center;
    align-content: center;
    justify-content: center;
    background: url(../img/bg-index.jpeg) no-repeat center center;
    background-size: cover;
    height: 100%;
    overflow: auto;
  }

  main {
    display: flex;
    border-radius: 2px;
    overflow: hidden;
    height: 100%;
    max-height: 370px;
    box-shadow: 0 0 10px rgba(56, 54, 53, 0.5);
  }
  main aside, main section {
    height: 100%;
    width: 300px;
  }
  main.pre-enter {
    opacity: 0;
    visibility: hidden;
  }
  main.pre-enter aside {
    -webkit-transform: none;
            transform: none;
  }
  main.on-enter {
    -webkit-animation: slideDown-fadeIn 1000ms linear forwards;
            animation: slideDown-fadeIn 1000ms linear forwards;
    visibility: visible;
  }
  main.on-enter aside {
    -webkit-animation: none;
            animation: none;
  }
}
@-webkit-keyframes lemon-white {
  0% {
    color: #DFB72C;
  }
  100% {
    color: white;
  }
}
@keyframes lemon-white {
  0% {
    color: #DFB72C;
  }
  100% {
    color: white;
  }
}

背景图片

bg-index.jpeg

【讨论】:

    猜你喜欢
    • 2013-08-27
    • 1970-01-01
    • 2018-01-25
    • 1970-01-01
    • 2015-09-18
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-03-02
    相关资源
    最近更新 更多