微信小程序开发如何实现阴影/悬浮效果

显示:

实现: 

<view style="width: 100%;height: 500rpx; display: flex; justify-content:space-evenly;align-items: center; ">
  <view style="width: 200rpx;height:100rpx;background-color: aqua; display: flex; align-items: center; justify-content: center;box-shadow: 0 0 10px darkgray">元素1</view>
  <view style="width: 200rpx;height:100rpx; background-color:yellow; display: flex; align-items: center; justify-content: center;">元素2</view>
</view>

关键代码:center;box-shadow: 0 0 10px darkgray

相关推荐

  1. 程序】canvas绘实现贴纸效果

    2024-01-26 14:24:02       51 阅读

最近更新

  1. docker php8.1+nginx base 镜像 dockerfile 配置

    2024-01-26 14:24:02       91 阅读
  2. Could not load dynamic library ‘cudart64_100.dll‘

    2024-01-26 14:24:02       97 阅读
  3. 在Django里面运行非项目文件

    2024-01-26 14:24:02       78 阅读
  4. Python语言-面向对象

    2024-01-26 14:24:02       88 阅读

热门阅读

  1. npm更换镜像

    2024-01-26 14:24:02       51 阅读
  2. Kotlin协程 SharingStarted

    2024-01-26 14:24:02       55 阅读
  3. react函数式组件和类组件

    2024-01-26 14:24:02       60 阅读
  4. 自幂数 水仙花数

    2024-01-26 14:24:02       62 阅读
  5. k8s安全机制

    2024-01-26 14:24:02       52 阅读