<div class="shell">
<div class="images">
<div class="img"></div>
<div class="img"></div>
<div class="img"></div>
<div class="img"></div>
<div class="img"></div>
</div>
<div class="min">
<div class="m"></div>
<div class="m"></div>
<div class="m"></div>
<div class="m"></div>
<div class="m"></div>
</div>
<div class="button">
<div class="button-left"><</div>
<div class="button-right">></div>
</div>
</div>
<div class="bg"></div>
HTML
格式化
支持Emmet,输入 p 后按 Tab键试试吧!
<head> ... </head>
<body>
</body>
<style>
* {
padding: 0px;
margin: 0px;
list-style: none;
bottom: 0;
text-decoration: none;
}
body {
display: flex;
justify-content: center;
align-items: center;
height: 100v;
background-color: #b7c4d8;
}
.shell {
width: 1200px;
height: 700px;
position: relative;
overflow: hidden;
border-radius: 15px;
box-shadow: 10px 5px 50px rgba(122, 39, 39, 0.39);
}
.images {
width: 500%;
height: 100%;
display: flex;
position: absolute;
left: 0;
transition: .2s;
}
.img {
width: 100%;
background-size: cover;
}
.img:nth-child(1) {
background-image: url("img/04.png");
background-color: #aabbcc;
}
.img:nth-child(2) {
background-image: url("img/02.png");
background-color: #aaccbb;
}
.img:nth-child(3) {
background-image: url("img/03.png");
background-color: #bbaacc;
}
.img:nth-child(4) {
background-image: url("img/01.png");
background-color: #bbccaa;
}
.img:nth-child(5) {
background-image: url("img/05.png");
background-color: #ccbbaa;
}
.min {
display: flex;
justify-content: space-evenly;
position: absolute;
bottom: 40px;
width: 30%;
z-index: 999;
left: 50%;
transform: translateX(-50%);
}
.m {
width: 20px;
height: 20px;
cursor: pointer;
border-radius: 50%;
border: solid rgba(255, 255, 255, 0.5) 5px;
background-color: #fff;
}
.button {
width: 100%;
height: 100%;
position: absolute;
display: flex;
justify-content: space-between;
user-select: none;
}
.button-left,
.button-right {
font-size: 50px;
background-color: rgba(102, 123, 161, 0.288);
padding: 0 20px;
cursor: pointer;
line-height: 700px;
color: #fff;
}
.bg{
width: 100vw;
height: 100vh;
background-image: url(./img/04.png);
z-index: -9999;
position: absolute;
filter:blur(12px);
opacity: .5;
}
</style>
预览
控制台