Changing background color of Ionic ion-item in CSS

前端 未结 10 1534

I have added the following code style=\"background-color: #C2A5A5 !important. But that has not worked for me. how can I add background color to ion-item?Thank

10条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-29 23:14

    Simply, use colors in variables.scss file (you can also define new colors) like that

    $colors: (
     primary:    #f9961e,
     secondary:  #882e2e,
     danger:     #f84e4e,
     light:      #f4f4f4,
     dark:       #222,
     newColor:   #000000,
    );
    

    and in your html file:

     
        Test
     
    

提交回复
热议问题