css 实现四角边框样式

效果如图

此图只实现 左下与右下边角样式

右上与左上同理

复制代码
/*  容器 */
.card-mini {
  position: relative;
}
/*  左下*/
.card-mini::before {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 20px;
  height: 20px;
  border-bottom: 2px solid #253d64;
  border-left: 2px solid #253d64;
  border-bottom-left-radius: 10px;
}
/*  右下*/
.card-mini::after {
  content: '';
  position: absolute;
  right: 0;
  bottom: 0;
  width: 20px;
  height: 20px;
  border-bottom: 2px solid #253d64;
  border-right: 2px solid #253d64;
  border-bottom-right-radius: 10px;
}

右上与左上 将上面的bottom改为top

复制代码
.card-mini::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  width: 20px;
  height: 20px;
  border-top: 2px solid #253d64;
  border-left: 2px solid #253d64;
  border-top-left-radius: 10px;
}
.card-mini::after {
  content: '';
  position: absolute;
  right: 0;
  top: 0;
  width: 20px;
  height: 20px;
  border-top: 2px solid #253d64;
  border-right: 2px solid #253d64;
  border-top-right-radius: 10px;
}
相关推荐
colicode11 分钟前
C#语音验证码API示例代码:快速实现.NET环境下的语音验证调用逻辑
前端·前端框架·语音识别
陆枫Larry37 分钟前
uni-swipe-action 从编辑页返回后滑动按钮仍显示的问题
前端
大时光37 分钟前
gsap 配置解读 --4
前端
Zachery Pole38 分钟前
JAVA_03_运算符
java·开发语言·前端
Lyda40 分钟前
i18n Ally Next:重新定义 VS Code 国际化开发体验
前端·javascript·后端
xiao阿娜的妙妙屋141 分钟前
Seedance2.0在哪可以用?自媒体人狂喜!这款AI视频神器我吹爆了
前端
橙序员小站41 分钟前
程序员如何做好年夜饭:用系统设计思维搞定一桌硬菜
前端·后端
瞌睡不醒44 分钟前
在行情面板中加入 K 线:一次结构升级的实现过程
前端
Flywith241 小时前
【2025 年终总结】北漂五年,而立,婚礼,折叠车
android·前端·程序员