列表图片库
List image gallery
初学者的死胡同,建立投资组合网站。
我的想法是使用鼠标滚轮将类别设置为可滚动的轮播,选择时我可以单击一个类别,然后垂直滚动的图像轮播将显示项目。对项目的任何点击都将显示一个水平滚动的轮播以显示项目详细信息。
无论我做什么都不会水平。下面是我的代码。
* {
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>
看起来你错过了给猫 class 显示:flex 就是全部
.Cats {
display: flex;
}
需要使其子项显示为 flex,就像您已经完成的那样
.Cats li {
display: flex;
flex-direction: row;
...
}
祝你的网站好运
初学者的死胡同,建立投资组合网站。
我的想法是使用鼠标滚轮将类别设置为可滚动的轮播,选择时我可以单击一个类别,然后垂直滚动的图像轮播将显示项目。对项目的任何点击都将显示一个水平滚动的轮播以显示项目详细信息。
无论我做什么都不会水平。下面是我的代码。
* {
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>
看起来你错过了给猫 class 显示:flex 就是全部
.Cats {
display: flex;
}
需要使其子项显示为 flex,就像您已经完成的那样
.Cats li {
display: flex;
flex-direction: row;
...
}
祝你的网站好运