css的伪元素做边框对角,使用伪元素的CSS边框问题

我已经创建了一个破碎的边框效果,但我不想在边框的末端进行锐利的外观,我希望它可以装箱。我已经搞砸了border-radius和我所能想到的一切,但不能想到任何事情。任何输入将不胜感激。使用伪元素的CSS边框问题

我想它看起来像这样:

Vk3j1.png

.container{padding-top: 40px;}

a h3{margin-top:0!important;}

.col-sm-15{

width: 18%;

margin:1%;

height: 4em;

float:left;

position:relative;

}

.col-sm-15 .wrap:before{

content: '';

position: absolute;

width: 50%;

height: calc(100% - 10px);

bottom: 0;

left: 0;

border: 10px solid transparent;

border-bottom-color: #330099;

border-left-color: #330099;

}

.col-sm-15 .wrap:after{

content: '';

position: absolute;

width: 50%;

height: calc(100% - 10px);

top: 0;

right: 0;

border: 10px solid transparent;

border-top-color: #330099;

border-right-color:#330099;

}

a h3{

font-size: 20px;

color: #000000;

padding: 10px;

margin-top: 3.2em;

}

a:hover{text-decoration: none;}

a:hover h3{color: #330099;}

Option 1

option 2

option 3

option 4

option 5

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值