How to disable ion-button shadow in ionic 4?

喜欢而已 提交于 2020-05-12 20:33:09

问题


I can't set the box-shadow property of ion-button to none in ionic 4, so how can I do that for a single button and for all the buttons at once ?


回答1:


 <ion-button  class="main-button"  >Get Started</ion-button>


    .main-button{
    --box-shadow:none;
 }

CSS Custom Properties

--box-shadow

--background

--color

There is whole list of CSS Custom Properties in this link https://ionicframework.com/docs/api/button




回答2:


I found a way that worked for me, the below code disables the ion-button shadow:

ion-button{ --box-shadow:none; }



来源:https://stackoverflow.com/questions/53634972/how-to-disable-ion-button-shadow-in-ionic-4

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!