yapi/client/components/ProjectCard/ProjectCard.scss
2017-08-23 17:23:54 +08:00

126 lines
2.4 KiB
SCSS

@import '../../styles/mixin.scss';
.card-container {
position: relative;
user-select: none;
transition: all .2s;
.m-card, .card-btns {
transform: translateY(0);
transition: all .2s;
}
&:hover {
.m-card, .card-btns {
transform: translateY(-4px);
}
}
&:active {
.m-card, .card-btns {
transform: translateY(4px);
}
}
// 卡片右上角按钮
.card-btns {
position: absolute;
top: 0;
right: 0;
width: .48rem;
height: .48rem;
background: linear-gradient(225deg, #ccc, #ccc 50%, transparent 0);
border-top-right-radius: 4px;
.icon {
cursor: pointer;
font-size: .16rem;
padding: .06rem;
position: absolute;
right: 0;
top: 0;
}
}
}
.m-card {
cursor: pointer;
text-align: center;
margin-bottom: .36rem;
transition: all .4s;
position: relative;
.ant-card-body {
background-color: $color-bg-gray;
border-radius: 4px;
padding-top: .24rem + .16rem + 1rem;
box-shadow: 0 4px 6px rgba(50,50,93,.11), 0 1px 3px rgba(0,0,0,.08);
}
.ui-logo {
width: 1rem;
height: 1rem;
border-radius: 50%;
position: absolute;
left: 50%;
top: 0;
transform: translate(-50%, .24rem);
font-size: .5rem;
color: #fff;
background-color: #2395f1;
line-height: 1rem;
box-shadow: 0 4px 6px rgba(50,50,93,.11), 0 1px 3px rgba(0,0,0,.08);
}
.ui-title {
font-size: .19rem;
font-weight: normal;
overflow: hidden;
text-overflow:ellipsis;
white-space: nowrap;
}
.m-card-body {
.icon {
font-size: .8rem;
}
.name {
font-size: .18rem;
margin-top: .16rem;
}
}
}
// .card-panel-s {
// .m-card {
// .ant-card-body {
// padding-top: .6rem;
// }
// .ui-logo {
// width: .6rem;
// height: .6rem;
// line-height: .6rem;
// transform: translate(-50%, -20%);
// font-size: .24rem;
// background-color: #2395f1;
// }
// }
// }
@media (max-width: 768px) {
.m-card {
.ant-card-body {
padding-top: .24rem + .16rem + .6rem;
}
.ui-logo {
width: .6rem;
height: .6rem;
line-height: .6rem;
font-size: .3rem;
}
}
}
@media (min-width: 768px) and (max-width: 992px) {
.m-card {
.ant-card-body {
padding-top: .24rem + .16rem + .8rem;
}
.ui-logo {
width: .8rem;
height: .8rem;
line-height: .8rem;
font-size: .4rem;
}
}
}