场景一、边框半透明,背景绿色

  默认情况下背景会延伸到边框所在的下边

  css 深入理解

  css2 中我们只能接受  css3 中我们可以通过 background-clip 属性来实现 

border: 10px solid hsla(0,0%,100%,.5);
background: white;
background-clip: padding-box;

 场景二、 多重边框

  box-shaow :投影方案  支持"," 分隔 多重投影

background: yellowgreen;
box-shadow: 0 0 0 10px #655, 0 0 0 15px deeppink;

  outline 方案

background: yellowgreen;
border: 10px solid #655;
outline: 5px solid deeppink;

  背景定位的扩展方案

background: url(code-pirate.svg) no-repeat #58a;
background-position: right 20px bottom 10px;

 

相关文章:

  • 2021-04-02
  • 2021-12-21
  • 2021-08-01
  • 2021-09-15
  • 2022-01-01
  • 2021-08-13
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-02-15
  • 2021-08-11
  • 2021-09-15
  • 2021-09-09
  • 2021-06-12
  • 2022-01-18
  • 2021-12-06
相关资源
相似解决方案