简体   繁体   中英

Angular Material md-card border bottom with down arrow

I would like to add an arrow effect to Angular Material cards (see image below) and I am not sure how to do so. I have set up a fiddle for help.

在此处输入图片说明

https://jsfiddle.net/er1187/rng1pv4u/1/

 <md-card flex layout-align='center center'>
   <md-card-content>
     TESTING
   </md-card-content>
 </md-card>

Create that using transparent border & box shadow.

md-card:after {
  content: "";
  position: absolute;
  box-shadow: rgba(0, 0, 0, 0.3) 2px 2px 2px ;
  -moz-transform: rotate(45deg);
  -webkit-transform: rotate(45deg);
  top: 35px;
  left: 48%;
  border-width: 15px;
  border-style: solid;
  border-color: transparent #FFF #FFF transparent;
}

Change border width according to what size of that that border made triangle you need (& accordingly you've to handle its position top value).

https://jsfiddle.net/shantanu_k/a8omvs2b/1/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM