浏览代码

Box-shadow to selected card

master
prahalad 3 年前
父节点
当前提交
963e6bf0fc
共有 2 个文件被更改,包括 46 次插入37 次删除
  1. +3
    -2
      src/app/create-committee/create-committee.component.html
  2. +43
    -35
      src/app/create-committee/create-committee.component.scss

+ 3
- 2
src/app/create-committee/create-committee.component.html 查看文件

@@ -3,13 +3,14 @@
</header> </header>


<section> <section>
<li *ngFor="let committee of committees" (click)='committee.isActive = !committee.isActive'>
<li *ngFor="let committee of committees" (click)='committee.isActive = !committee.isActive'
[ngClass]="{'isActive':committee.isActive === true }">
<img src="../../assets/images/Investigator.jpg" alt=""> <img src="../../assets/images/Investigator.jpg" alt="">
<div class="upfold"> <div class="upfold">
<h6>{{committee.name}}</h6> <h6>{{committee.name}}</h6>
<span>{{committee.designation}}</span> <span>{{committee.designation}}</span>
</div> </div>
<div class="check-box" [ngClass]="{'isActive':committee.isActive === true }"></div>
<div class="check-box"></div>
</li> </li>
</section> </section>




+ 43
- 35
src/app/create-committee/create-committee.component.scss 查看文件

@@ -16,46 +16,21 @@ section {
cursor: pointer; cursor: pointer;
background-color: var(--shadow-grey); background-color: var(--shadow-grey);
filter: brightness(115%); filter: brightness(115%);
.upfold {
width: 20rem;
padding-left: 2rem;

h6 {
font-size: 1.6rem;
color: var(--primary);
padding: 0.3rem 0;
}
span {
font-size: 1.4rem;
color: var(--primary);
}
}

img {
width: 5rem;
height: 5rem;
border-radius: 50%;
margin-left: 1rem;
}


.check-box {
width: 1.8rem;
&.isActive {
background-color: white; background-color: white;
height: 1.8rem;
margin: 0 auto;
border-radius: 0.4rem;
box-shadow: inset 0px 1px 4px 0px var(--dark-grey);

&.isActive {
border: 1px solid var(--shadow-grey);
box-shadow: 0rem 0rem 0.5rem 0.5rem var(--shadow-grey);
filter: brightness(110%);
.check-box{
position: relative; position: relative;
display: inline-block; display: inline-block;
width: 1.8rem; width: 1.8rem;
height: 1.8rem; height: 1.8rem;
background-color: var(--success); background-color: var(--success);
box-shadow: none; box-shadow: none;
&::before { &::before {
content: ""; content: "";
position: absolute; position: absolute;
@@ -67,7 +42,7 @@ section {
transform: translateX(10px) rotate(-45deg); transform: translateX(10px) rotate(-45deg);
transform-origin: left bottom; transform-origin: left bottom;
} }
&::after { &::after {
content: ""; content: "";
position: absolute; position: absolute;
@@ -78,19 +53,52 @@ section {
background-color: white; background-color: white;
transform: translateX(10px) rotate(-45deg); transform: translateX(10px) rotate(-45deg);
transform-origin: left bottom; transform-origin: left bottom;

} }
} }
} }
.upfold {
width: 20rem;
padding-left: 2rem;

h6 {
font-size: 1.6rem;
color: var(--primary);
padding: 0.3rem 0;
}
span {
font-size: 1.4rem;
color: var(--primary);
}
}

img {
width: 5rem;
height: 5rem;
border-radius: 50%;
margin-left: 1rem;
}

.check-box {
width: 1.8rem;
background-color: white;
height: 1.8rem;
margin: 0 auto;
border-radius: 0.4rem;
box-shadow: inset 0px 1px 4px 0px var(--dark-grey);

}
} }
} }



.user-action { .user-action {
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
height: 10rem; height: 10rem;

button { button {
width: 15rem; width: 15rem;
margin: 0 1rem; margin: 0 1rem;


正在加载...
取消
保存