diff --git a/src/assets/home/box.png b/src/assets/home/box.png new file mode 100644 index 0000000..6eaa0b0 Binary files /dev/null and b/src/assets/home/box.png differ diff --git a/src/assets/home/cicle-inner.png b/src/assets/home/cicle-inner.png new file mode 100644 index 0000000..3568ea1 Binary files /dev/null and b/src/assets/home/cicle-inner.png differ diff --git a/src/assets/home/cicle-out.png b/src/assets/home/cicle-out.png new file mode 100644 index 0000000..c1b9706 Binary files /dev/null and b/src/assets/home/cicle-out.png differ diff --git a/src/assets/home/left-line.png b/src/assets/home/left-line.png new file mode 100644 index 0000000..8c205da Binary files /dev/null and b/src/assets/home/left-line.png differ diff --git a/src/assets/home/line-left.gif b/src/assets/home/line-left.gif new file mode 100644 index 0000000..49bb500 Binary files /dev/null and b/src/assets/home/line-left.gif differ diff --git a/src/assets/home/line-right.gif b/src/assets/home/line-right.gif new file mode 100644 index 0000000..19483b8 Binary files /dev/null and b/src/assets/home/line-right.gif differ diff --git a/src/assets/home/right-line.png b/src/assets/home/right-line.png new file mode 100644 index 0000000..2033f3f Binary files /dev/null and b/src/assets/home/right-line.png differ diff --git a/src/components/Banner.vue b/src/components/Banner.vue index 9f402b1..33b6615 100644 --- a/src/components/Banner.vue +++ b/src/components/Banner.vue @@ -1,5 +1,16 @@ @@ -124,12 +146,107 @@ const onSearch = () => { align-items: center; justify-content: center; + .left-trans, + .middle, + .right-trans { + display: inline-block; + height: 556px; + } + + .left-trans { + width: 150px; + background: url("../assets/home/left-line.png") no-repeat top 60px left; + overflow: hidden; + + .animation-area { + position: relative; + margin-top: 60px; + height: 450px; + float: right; + + display: flex; + justify-content: space-between; + align-items: center; + flex-direction: column; + } + + .box-left { + margin-top: -40px; + margin-left: -40px; + animation: jump 2s ease-in-out 1s infinite alternate; + } + + .circle-area { + position: relative; + width: 91px; + height: 91px; + + .left-out-cicle { + position: absolute; + left: 0; + top: 0; + animation: clockwise 2.5s linear infinite; + } + + .left-inner-cicle { + width: 70px; + position: absolute; + left: 10px; + top: 11px; + animation: anticlockwise 2.5s linear infinite; + } + } + } + + .right-trans { + width: 150px; + background: url("../assets/home/right-line.png") no-repeat top 60px right; + overflow: hidden; + + .animation-area { + position: relative; + margin-top: 60px; + height: 450px; + float: left; + display: flex; + justify-content: space-between; + align-items: center; + flex-direction: column; + } + + .box-right { + margin-right: -30px; + animation: jump 2s ease-in-out 0.1s infinite alternate; + } + + .circle-area { + position: relative; + width: 91px; + height: 91px; + + .right-out-cicle { + position: absolute; + left: 0; + top: 0; + animation: clockwise 2.5s linear infinite; + } + + .right-inner-cicle { + width: 70px; + position: absolute; + left: 10px; + top: 12px; + animation: anticlockwise 2.5s linear infinite; + } + } + } + .middle { height: 556px; position: relative; width: 1000px; flex-shrink: 0; - background: url("/assets/images/ball.png") center center no-repeat; + background: url("../assets/ball.png") center center no-repeat; .search-box { width: 700px; @@ -190,4 +307,32 @@ const onSearch = () => { } } } + +// 动画区 +@keyframes clockwise { + 0% { + transform: rotate(0deg); + } + 100% { + transform: rotate(360deg); + } +} + +@keyframes anticlockwise { + 0% { + transform: rotate(360deg); + } + 100% { + transform: rotate(0deg); + } +} + +@keyframes jump { + from { + transform: translate(0, 0); + } + to { + transform: translate(0, 15px); + } +}