【发布时间】:2022-08-08 15:00:20
【问题描述】:
我正在尝试使用 html 和 css 创建一个按钮,该按钮是三个边的矩形,右侧有一个圆形部分,按钮边框围绕它。
这是我尝试创建的按钮的图像:
到目前为止我的代码:
#GetOTPBlock {
display: flex;
width: fit-content;
padding: 8px
}
.get-otp {
font-size: 10px;
padding: 4px;
border: solid 2px #849dad;
border-radius: 50%;
font-weight: bold;
color: #747f86;
background-color: #f1f1f1;
z-index: 333;
}
<div class=\"row\" id=\"GetOTPBlock\">
<span class=\"get-otp\">OR</span>
<div id=\"GetOTPBlockAction\">
<a href=\"javascript:void(0);\" title=\"Get OTP\">Get OTP</a>
</div>
</div>
-
你能过去你到目前为止的代码吗?
-
当然,我发布了代码。
-
我会做这样的事情:jsfiddle.net/dbcov2et 编辑:哦,我现在才看到你的代码。
-
如果圆圈只是一个视觉线索,那么使用 CSS 而不是 HTML 来创建它。您可以在元素之前或之后添加一个伪元素来执行此操作。