提交 516f1c57 authored 作者: xiaotuoluo's avatar xiaotuoluo

1

上级 92e5a467
<template>
<div class="home-container">
<!-- 顶部导航 -->
<div style="background-color: #000; height: 50px;">
<div class="van-nav-bar__title">
<div style="height: 40px; margin: 10px 0 0;">
<img src="https://admin.xianyuxx.motorcycles/upload/80dc096a3a8977cd/0cf63ef072b934bc.png" />
<div class="van-nav-bar__content" style="background-color: #000; height: 50px;">
<div class="van-nav-bar__title van-ellipsis">
<div class="menu-item-icon van-image" style="height: 40px; margin: 10px 0 0;">
<img src="https://admin.xianyuxx.motorcycles/upload/80dc096a3a8977cd/0cf63ef072b934bc.png"
class="van-image__img" />
</div>
</div>
<div>
<i class="van-icon" style="color:#fff; font-size:24px;"></i>
<div class="van-nav-bar__right">
<i class="van-icon van-icon-chat-o" style="color:#fff; font-size:24px;"></i>
</div>
</div>
......@@ -28,11 +29,32 @@
<div class="linear-gradient"></div>
</div>
<div>666</div>
<div class="middelTit">
<span class="middelTit-left">High-end Zone</span>
<div class="middelTit-right">Enjoy the ultimate luxury experience</div>
</div>
<div class="middleImg">
<div v-for="value in gridItems" class="grid-item" :key="value.src">
<img style="width: 200px; height: 200px;border-radius: 10px;" :src="value.src" alt="">
<div class="gridItemTag">
<span class="textTag">Yes</span>
</div>
</div>
</div>
<div style="font-size: 26px;">Recommended connections</div>
</div>
</template>
<script>
import img1 from '@/assets/user/1.jpg'
import img2 from '@/assets/user/2.jpg'
import img3 from '@/assets/user/3.jpg'
import img4 from '@/assets/user/4.jpg'
import img5 from '@/assets/user/5.jpg'
import img6 from '@/assets/user/6.jpg'
import img7 from '@/assets/user/7.jpg'
import img8 from '@/assets/user/8.jpg'
import img9 from '@/assets/user/9.jpg'
export default {
data() {
return {
......@@ -46,6 +68,26 @@ export default {
],
currentIndex: 0,
currentNotice: "",
gridItems: [
{ src: img1 },
{ src: img2 },
{ src: img3 },
{ src: img4 },
{ src: img5 },
{ src: img6 },
{ src: img7 },
{ src: img8 },
{ src: img9 },
{ src: img1 },
{ src: img2 },
{ src: img3 },
{ src: img4 },
{ src: img5 },
{ src: img6 },
{ src: img7 },
{ src: img8 },
{ src: img9 },
]
}
},
mounted() {
......@@ -58,9 +100,7 @@ export default {
}
</script>
<style lang="less" scoped>
<style lang="scss" scoped>
.home-container {
position: relative;
min-height: 100vh;
......@@ -76,7 +116,7 @@ export default {
.notice-bar {
position: relative;
padding: 30px;
background: #f3f3f5;
background: "#fff"
}
.notice-swipe {
......@@ -120,4 +160,65 @@ export default {
.banner {
margin-top: 0px;
}
.middleImg{
display: grid;
grid-auto-flow: column;
grid-template-rows: repeat(2,200px);
grid-auto-columns: 200px;
gap: 20px;
overflow-x: auto;
padding: 10px;
}
.grid-item {
background-color: #4ade80;
position: relative;
display: flex;
justify-content: center;
align-items: center;
color: white;
border-radius: 6px;
overflow: hidden;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); /* X偏移 Y偏移 模糊 半透明黑色 */
.gridItemTag{
position: absolute;
top: -30px;
right: -70px; /* 根据旋转角度调整位置 */
background-color: #000; /* 黑底 */
color: #fff; /* 白字 */
width: 200px;
height: 100px;
// font-size: 18px;
font-weight: bold;
align-items: center;
transform: rotate(45deg); /* 旋转 45° */
.textTag{
position: absolute;
bottom: 5px;
left: 80px;
font-size: 30px;
}
}
}
.middelTit{
display: flex;
flex-direction: row;
padding: 10px;
align-items: center;
font-weight: 500;
&-left{
font-size: 26px;
}
&-right{
border-top-left-radius: 20px;
border-bottom-right-radius: 20px;
background-color: #000;
color: #fff;
font-size: 20px;
padding: 5px;
margin-left: 10px;
}
}
</style>
\ No newline at end of file
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论