uniapp 修改样式无效

一、问题描述

我这边定义了一个组件,然后在外面想修改组件的背景色,以下方式修改无效:

.fixedBox {
    
    
   background-color: red !important;
}

二、解决方法

通过使用/deep/解决了:

	/deep/ .fixedBox {
    
    
		background-color: red !important;
	}

猜你喜欢

转载自blog.csdn.net/mashangzhifu/article/details/118559320