1 个回答
  1. border border-left: 1px solid #f00
  2. box-shadow box-shadow: inset 2px 0px 0 0 #0f0;
  3. :before + absolute
  4. background

最自由肯定是 absolute 定位了。

image.png

h6.card-header {
    border-left: 1px solid #f00;
    box-shadow: inset 2px 0px 0 0 #0f0;
    border-radius: 0;
    background:linear-gradient(#ff0,#ff0) 4px 4px;
    background-repeat: no-repeat;
    background-size: 4px 4px 
}
h6.card-header:before {
    content: '';
    border-left: 1px solid #00f;
    position: absolute;
    left: 3px;height: 20px;
}
撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题