jh-admin/addon/supply/shop/view/public/css/index.scss

273 lines
4.0 KiB
SCSS

@import './common.scss';
/* 首页 */
.ns-supply-index {
margin-top: 10px;
}
/* 分类/banner */
.ns-supply-index-center {
width: 100%;
display: flex;
justify-content: space-between;
}
.ns-supply-index-category {
width: 190px;
background-color: #FFFFFF;
height: 358px;
padding: 5px 0;
box-sizing: border-box;
ul {
width: 100%;
position: relative;
}
li {
padding: 5px 16px;
cursor: pointer;
// position: relative;
.ns-cate-title {
display: flex;
justify-content: space-between;
align-items: center;
}
span {
max-width: 130px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
i {
font-size: 12px;
color: #969799;
}
}
.na-cate-list {
display: none;
width: 500px;
min-height: 358px;
background-color: #fff;
padding: 16px;
box-shadow: 4px 4px 4px rgba(125,126,128,.16), 4px -4px 4px rgba(125,126,128,.16);
border-left: 1px solid #fff;
box-sizing: border-box;
z-index: 100;
position: absolute;
left: 190px;
top: -5px;
}
.ns-cate-li {
margin-bottom: 10px;
h4 {
font-size: 14px;
line-height: 20px;
font-weight: 700;
color: #333;
margin-bottom: 8px;
display: inline-block;
width: 80px;
text-align: right;
}
}
.ns-cate-con {
display: inline-block;
vertical-align: top;
width: 360px;
span {
display: inline-block;
font-size: 12px;
color: #646566;
margin-right: 12px;
line-height: 22px;
}
span:hover {
color: $base-color;
}
}
li:hover {
background-color: rgba($color: $base-color, $alpha: .1);
.ns-cate-title span, .ns-cate-title i {
color: $base-color;
}
.ns-cate-bg {
background-color: $base-color;
opacity: .1;
}
.na-cate-list {
display: block;
}
}
}
.ns-supply-index-banner {
width: 800px;
height: 358px;
.layui-carousel {
.layui-carousel-img {
width: 100%;
height: 100%;
img {
width: 100%;
height: 100%;
object-fit: cover;
}
}
.layui-carousel-ind ul {
background-color: transparent;
}
}
}
// 商品列表
.ns-goods-list {
width: 100%;
padding: 0 10px;
box-sizing: border-box;
display: flex;
flex-wrap: wrap;
margin-top: 30px;
}
.ns-goods-li {
width: 180px;
overflow: hidden;
margin-right: 20px;
margin-bottom: 30px;
background-color: #fff;
padding: 5px;
box-sizing: border-box;
&:nth-child(5n) {
margin-right: 0;
}
.ns-goods-img {
width: 100%;
height: 170px;
box-sizing: border-box;
overflow: hidden;
position: relative;
img {
width: 100%;
height: 100%;
object-fit: cover;
transition: all 1s ease-out;
}
.ns-goods-sale {
font-size: 12px;
position: absolute;
bottom: 0;
padding-left: 10px;
width: 100%;
height: 30px;
line-height: 30px;
background-color: rgba(0,0,0,.6);
color: #c8c9cc;
box-sizing: border-box;
.sale-label {
opacity: .66;
}
.sale-num {
display: inline-block;
margin-left: 10px;
color: #fff;
}
}
.hover-content {
display: none;
font-size: 12px;
position: absolute;
bottom: 0;
width: 100%;
height: 30px;
line-height: 30px;
text-align: center;
background-color: $base-color;
color: #fff;
font-weight: bolder;
}
}
.ns-goods-img:hover {
border: 2px solid $base-color;
img {
transform: scale(1.2);
}
.hover-content {
display: block;
}
}
.ns-goods-name {
font-size: 12px;
color: #323233;
margin: 5px 0;
height: 42px;
padding: 0 5px;
&:hover {
color: $base-color;
}
}
.ns-goods-info {
position: relative;
padding: 0 5px;
p {
font-size: 12px;
span:first-child {
color: #969799;
display: inline-block;
}
}
.ns-goods-profit {
font-size: 15px;
}
p:nth-child(2) {
margin-top: 5px;
}
p:nth-child(3) {
position: absolute;
right: 0;
bottom: 0;
cursor: pointer;
}
}
}
// 商品列表标题
.goods-list-title {
text-align: left;
font-size: 25px;
margin-top: 40px;
border-left: 6px solid red;
padding-left: 20px;
}