uniapp modification style invalid

1. Problem description

I define a component here, and then want to modify the background color of the component outside, the following modification is invalid:

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

Two, the solution

Solved by using /deep/:

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

Guess you like

Origin blog.csdn.net/mashangzhifu/article/details/118559320
Recommended