215 lines
4.3 KiB
Vue
215 lines
4.3 KiB
Vue
<template>
|
|
<div class="grid">
|
|
<div class="grid_box">
|
|
<div class="grid_left">
|
|
<a href="">
|
|
<span class="pic">
|
|
<img src="http://www.yipengtaoci.com/images/ibg0.jpg" alt=""/>
|
|
</span>
|
|
<span class="info">产品分类</span>
|
|
<span>了解更多</span>
|
|
</a>
|
|
</div>
|
|
<div class="grid_right">
|
|
<ul>
|
|
<li :class="'pic_'+picIndex" v-for="(picItem,picIndex) in pics" :key="picItem.src">
|
|
<a :href="picItem.href">
|
|
<span class="pics">
|
|
<img :src="picItem.src" alt=""/>
|
|
</span>
|
|
<span class="info">{{ picItem.name }}</span>
|
|
</a>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
|
|
<script>
|
|
export default {
|
|
name: "ProductsClassify",
|
|
data() {
|
|
return {
|
|
pics: [
|
|
{
|
|
href: '',
|
|
src: 'http://www.yipengtaoci.com/upfiles/images/20200717/15949961573658658.png',
|
|
name: '瓷抛大理石'
|
|
},
|
|
{
|
|
href: '',
|
|
src: 'http://www.yipengtaoci.com/upfiles/images/20200717/15949961872720151.jpg',
|
|
name: '通体大理石'
|
|
},
|
|
{
|
|
href: '',
|
|
src: 'http://www.yipengtaoci.com/upfiles/images/20200717/15949962397730467.jpg',
|
|
name: '中板通体大理石'
|
|
},
|
|
{
|
|
href: '',
|
|
src: 'http://www.yipengtaoci.com/upfiles/images/20200717/15949963006120695.jpg',
|
|
name: '大板通体大理石'
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style scoped lang="scss">
|
|
@media screen and (max-width: 1660px) {
|
|
.grid_box {
|
|
width: 1230px !important;
|
|
}
|
|
.pic{
|
|
img{
|
|
width: 400px !important;
|
|
}
|
|
}
|
|
.grid_right {
|
|
ul {
|
|
li {
|
|
a {
|
|
width:360px !important;
|
|
height: 267px!important;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
@media screen and (max-width: 1480px) {
|
|
.grid_box {
|
|
width: 1100px !important;
|
|
}
|
|
.pic{
|
|
img{
|
|
width: 385px !important;
|
|
}
|
|
}
|
|
.grid_right {
|
|
ul {
|
|
li {
|
|
a {
|
|
width:341px !important;
|
|
height: 258px!important;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
.grid {
|
|
width: 100%;
|
|
padding: 50px 0 60px 0;
|
|
background-color: #f9f9f9;
|
|
position: relative;
|
|
min-width: 1300px;
|
|
display: flex;
|
|
.grid_box {
|
|
width: 1360px;
|
|
display: flex;
|
|
margin: 0 auto;
|
|
|
|
.grid_left:hover {
|
|
filter: brightness(85%);
|
|
opacity: 1;
|
|
}
|
|
|
|
.grid_left {
|
|
position: relative;
|
|
transition: all 0.6s;
|
|
display: block;
|
|
padding: 6px;
|
|
|
|
a {
|
|
position: relative;
|
|
display: inline-block;
|
|
width: 100%;
|
|
background-color: #000;
|
|
|
|
.pic {
|
|
transition: all 0.6s;
|
|
|
|
img {
|
|
display: block;
|
|
width: 440px;
|
|
}
|
|
}
|
|
|
|
span:last-child {
|
|
color: #fff;
|
|
position: absolute;
|
|
top: 50%;
|
|
left: 50%;
|
|
width: 160px;
|
|
height: 36px;
|
|
line-height: 36px;
|
|
margin: 20px 0 0 -80px;
|
|
font-size: 16px;
|
|
letter-spacing: 2px;
|
|
text-align: center;
|
|
background-color: #de832f;
|
|
border-radius: 100px 100px 100px 100px;
|
|
}
|
|
}
|
|
}
|
|
|
|
.info {
|
|
color: #fff;
|
|
position: absolute;
|
|
top: 42%;
|
|
left: 0;
|
|
width: 100%;
|
|
font-size: 34px;
|
|
font-weight: bold;
|
|
letter-spacing: 2px;
|
|
text-align: center;
|
|
text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
|
|
z-index: 999;
|
|
}
|
|
|
|
.grid_right {
|
|
ul {
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
|
|
li {
|
|
padding: 5px;
|
|
|
|
a {
|
|
width: 444px;
|
|
height: 295px;
|
|
overflow: hidden;
|
|
position: relative;
|
|
display: inline-block;
|
|
background-color: #066090;
|
|
|
|
span:first-child {
|
|
width: 100%;
|
|
filter: alpha(opacity=94);
|
|
-moz-opacity: 0.94;
|
|
opacity: 0.94;
|
|
transition: all 0.6s;
|
|
|
|
img {
|
|
width: 100%;
|
|
overflow: hidden;
|
|
transition: all 0.6s;
|
|
}
|
|
|
|
img:hover {
|
|
filter: brightness(85%);
|
|
opacity: 1;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
</style>
|