列出图片库

问题描述 投票:0回答:1

初学者的终点,建立一个投资组合网站。

想法是将类别作为可使用鼠标滚轮滚动的轮播,选择时我可以单击一个类别,然后垂直滚动的图像轮播将显示项目。在项目上的任何点击都会显示一个水平滚动的轮播,以了解项目的详细信息。

不管我做什么,都不会水平。下面是我的代码。

* {
  margin: 0;
  padding: 0;
}

body {
  background-color: #002342
}

h1 {
  color: #0096d1;
  font-family: 'Saira Extra Condensed', sans-serif;
  text-align: center;
  font-size: 6em;
  margin: auto;
}

.Cotainer {
  height: 500px;
  width: 750px;
  background: #E4E4E4;
  position: relative;
  margin: auto;
  top: 50px;
}

.Cats li {
  display: flex;
  flex-direction: row;
  width: 300px;
  height: 300px;
  background-color: red;
  margin: 10px;
  overflow-x: auto;
}
<DOCTYPE html>
  <!DOCTYPE html>
  <html>

  <head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width" , initial-scale=1.0>
    <title>Majd AL HYDER</title>
    <link href="https://fonts.googleapis.com/css2?family=Saira+Extra+Condensed:wght@600&display=swap" rel="stylesheet">
    <link rel="stylesheet" type="text/css" href="style.css" />
  </head>

  <body>
    <H1>My Folio</H1>
    <div class="Cotainer">

      <ul class="Cats">
        <li class="Solid">
          SolidWorks
          <!-list containing projects->
          <-! list containg project details>
            <!-/list containing projects->
        </li>
        <li class="Catia">
          Catia
          <!-list containing projects->
          <-! list containg project details>
            <!-/list containing projects->
        </li>
        <li class="Art">
          Art
          <!-list containing projects->
          <-! list containg project details>
            <!-/list containing projects->
        </li>
      </ul>

    </div>
  </body>

  </html>

Result

html css frontend carousel
1个回答
0
投票

看起来好像您错过了给Cats类显示的内容:flex就是全部😊

© www.soinside.com 2019 - 2024. All rights reserved.