colorful-shadow
使用重叠的方式来实现box-shadow目前不能实现的阴影效果,比如:渐变阴影、内容相关阴影等。
怎么使用
- npm install colorful-shadow;
- 使用script标签或者其它方式引入代码;
- 可以调用
init
方法来实现自定义的重叠内容阴影; - 也可以直接调用
bottomContentShadow
来实现底部内容投影阴影; - 或者调用
bottomGradientShadow
来实现底部渐变阴影。
目录说明
- index.js 为源代码;
- test.html 为测试页面;
- images 项目相关图片资源。