The Vue project transparency opacity value sets the percentage, which will become 1% after packaging and online.

After developing and launching the app today, I found that one module had a completely white screen and was not displayed. It instantly attracted the attention of the entire team and I was scared to death!

Later, I found that long-pressing the blank space can copy, indicating that the html structure exists, and it should be a display problem. When I put it on the web page and looked at the css style, I found that the outermost layer of the module has an opacity transparency style value of 1%.

Insert image description here
The code obviously said 85%, but I checked it later. . .

Solution:
Change 85% to 0.85

.result-content {
    
    
  background: #70c0ff;
  opacity: 0.85;
  height: 240px;
  ...
}

Reason: (The foundation is not solid!!!)

The range of opacity is 0-1

おすすめ

転載: blog.csdn.net/weixin_44786330/article/details/128861656