freeCodeCamp/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-css-animation-by-buil.../617ace7d831f9c16a569b38a.md

1.4 KiB

id title challengeType dashedName
617ace7d831f9c16a569b38a 步驟 5 0 step-5

--description--

給你的 .wheel 選擇器一個 max-heightmax-width 屬性,都設置爲 500px

--hints--

你的 .wheel 選擇器應該有一個 max-height 屬性設置爲 500px

assert(new __helpers.CSSHelp(document).getStyle('.wheel')?.maxHeight === '500px');

你的 .wheel 選擇器應該有一個 max-width 屬性設置爲 500px

assert(new __helpers.CSSHelp(document).getStyle('.wheel')?.maxWidth === '500px');

--seed--

--seed-contents--

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8">
    <title>Ferris Wheel</title>
    <link rel="stylesheet" href="./styles.css">
  </head>
  <body>
    <div class="wheel">
      <span class="line"></span>
      <span class="line"></span>
      <span class="line"></span>
      <span class="line"></span>
      <span class="line"></span>
      <span class="line"></span>

      <div class="cabin"></div>
      <div class="cabin"></div>
      <div class="cabin"></div>
      <div class="cabin"></div>
      <div class="cabin"></div>
      <div class="cabin"></div>
    </div>
  </body>
</html>
--fcc-editable-region--
.wheel {
  border: 2px solid black;
  border-radius: 50%;
  margin-left: 50px;
  position: absolute;
  height: 55vw;
  width: 55vw;
}
--fcc-editable-region--