主要知识点:
hsla
- h:色相; 0(或360)表示红色,120表示绿色,240表示蓝色 。
- s:饱和度; 0.0% - 100.0% 。
- l:亮度; 0.0% - 100.0% 。
- a:透明度;0-1;。
css代码
background-color: white;
border:10px solid rgba(200,200,200, 0.5);
/*不使用background-clip的话边框是实色的话无影响,但如果用透明色就可能会与背景色混合,导致达不到期望的效果*/
background-clip: padding-box;