css

使用background-image实现一些东西

Posted by Lauginwing on April 15, 2020

可以设置多个值,之间用逗号分隔

叠加效果,顺序靠前的在上层

使用 radial-gradient 做出镂空效果

使用 linear-gradient 做出 border 的效果

使用 box-shadow 做出 border 的效果

语法:

1
2
3
/** x偏移量 | y偏移量 | 阴影模糊半径 | 阴影扩散半径 | 阴影颜色 **/
/* 任意数量的阴影,以逗号分隔 */
box-shadow: inset 2px 2px 2px 1px rgba(0, 0, 0, 0.2), 4px 4px 10px 0 green;