Compare commits

..

2 Commits

Author SHA1 Message Date
AviderMin 74fbfc6e1e 增加图片缩放效果
4 weeks ago
AviderMin a4f9b12da5 none
4 weeks ago

@ -1,15 +0,0 @@
{
// 使 IntelliSense
//
// 访: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "chrome",
"request": "launch",
"name": "针对 localhost 启动 Chrome",
"url": "http://localhost:8080",
"webRoot": "${workspaceFolder}"
}
]
}

@ -38,6 +38,10 @@
width: 100%; width: 100%;
height:210px; height:210px;
overflow: hidden; overflow: hidden;
transition: 0.8s;
}
.boxcover img:hover{
transform: scale(1.1);
} }
.boxinfo{ .boxinfo{
background-color: #ebebeb; background-color: #ebebeb;

@ -10,7 +10,8 @@
margin-bottom: 30px; margin-bottom: 30px;
} }
.banner img{ .banner img{
justify-content: baseline; width: 100%;
height: 400px;
} }
.newszy{ .newszy{
background-color: skyblue; background-color: skyblue;

@ -45,6 +45,27 @@
<script> <script>
let totalHight; let totalHight;
let Prostick; let Prostick;
const imgs = document.querySelector('.banner img')
let Picsrc = [
{ src: 'pics/43401.png' },
{ src: 'pics/43402.png' },
{ src: 'pics/47202.jpg' },
{ src: 'pics/47204.jpg' }
]
let i = 0
setInterval(function Imgs() {
if (i < Picsrc.length) {
imgs.src = Picsrc[i].src
console.log(i)
i++
if (i == Picsrc.length) {
i = 0
}
}
}, 2000)
window.addEventListener('load', function () {
imgs.src = Picsrc[0].src
})
document.addEventListener("DOMContentLoaded", function () { document.addEventListener("DOMContentLoaded", function () {
let imgs = []; let imgs = [];

Loading…
Cancel
Save