How to add shadow effects to other components on top of map components without being obscured by map

< H3 > Ben Xiaobai was recently practicing WeChat Mini Programs. He wanted to imitate the interface of Mini Program, Didi"s green orange bike. A detail was found in the process, which made it difficult to achieve the same effect as the official. I would like to ask if the seniors who have stepped on similar pits can tell us how to solve them.

specific pit

  • map has the highest priority, which obscures the shadows made by box-shadow

the home page of Green Orange Bike


  • viewbox-shadow,map
  • map box-shadow inset


the real machine will be covered

all kinds of tests have failed. The shadow is actually added successfully. The developer tool displays the shadow style normally, but it will be obscured by the map component on the real machine. I don"t know how the Green Orange Bike officially avoided the map pit and made this effect

.

you need to use this. Add a picture to achieve it. The effects you mentioned are all achieved in this way.

Menu