使用::after伪元素画C型半圆环,适用于拐弯

在这里插入图片描述

<!DOCTYPE html>
<html>
<head>
<style>
.element1{
	width: 100px;
	height: 200px;
}

.element1::after{
	content: "";
	display: block;
	width: 92px;
	height: 184px;
	border-radius: 84px 0 0 84px;
	border: 8px solid #409EFF;
	border-right: none;
	position: relative;
	top: 0px;
	left: 0px;
}
.element2{
	width: 100px;
	height: 200px;
}

.element2::after{
	content: "";
	display: block;
	width: 92px;
	height: 184px;
	border-radius: 0 84px 84px 0;
	border: 8px solid #409EFF;
	border-left: none;
	position: relative;
	top: 0px;
	left: 0px;
}
.element3{
	width: 80px;
	height: 160px;
}

.element3::after{
	content: "";
	display: block;
	width: 72px;
	height: 144px;
	border-radius: 0 84px 84px 0;
	border: 8px solid #409EFF;
	border-left: none;
	position: relative;
	top: 0px;
	left: 0px;
}
.element4{
	width: 80px;
	height: 160px;
}

.element4::after{
	content: "";
	display: block;
	width: 72px;
	height: 144px;
	border-radius: 84px 0 0 84px;
	border: 8px solid #409EFF;
	border-right: none;
	position: relative;
	top: 0px;
	left: 0px;
}
</style>
</head>
<body>
<div class="element1"></div>
<div class="element2"></div>
<div class="element3"></div>
<div class="element4"></div>
</body>
</html>
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值