简体   繁体   English

如何在垫子按钮,右边框/左边框上添加边框颜色?

[英]How to add border color on mat button , right border / left border?

I am trying to add right border color to a mat-stroked button, but i am unable to achieve the results.我正在尝试将右边框颜色添加到垫子抚摸按钮,但我无法实现结果。

<button class="example" mat-stroked-button>New <br /> Comment</button>

CSS- CSS-

    .example{
  color: red;
  border-radius: 3px;
  border-right: black;
}

But that doesnt work, replacing border-right with border gives the border throughout which i dont want, i want border color only at the right border.但这不起作用,用border替换border-right会给出我不想要的边框,我只想要右边框的边框颜色。

Can anyone help me achieve this?谁能帮我实现这一目标?

Thanks in Advance提前致谢

Demo in this stackblitz linkstackblitz 链接中的演示

You need border-right-color: black;你需要border-right-color: black; ... ...

Your css class .example is as below..您的 css class .example如下..

.example {
  color: red;
  border-left: none;
  border-top: none;
  border-bottom: none;
  border-radius: 3px;
  border-right-color: black;
}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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