javascript - 不使用边框的圆形边框-?
问题描述
我有一个带有如下边框的圆圈,如何在不使用的情况下在这个圆圈上设置边框border-right, left, top, bottom
?我想添加一个边框,例如只为这个圆形边框的 10-20%
.circle {
background-color:#fff;
border-bottom:1px solid red;
border-radius: 100%;
height:100px;
width:100px;
}
<div class="circle"></div>
谢谢你的帮助
解决方案
如果要在圆圈的左右添加边框,我建议使用这种方式;你可以改变底部的像素
.circle {
background-color:#fff;
border:1px solid red;
border-radius: 100%;
height:100px;
width:100px;
position:relative;
}
.circle::after{
content:'';
width:100px;
height:100px;
background-color:white;
position:absolute;
border-radius:50%;
bottom:30px;
}
推荐阅读
- java - 仅从 Android Studio 上的 JAVA 中的 JSON api 获取字符串
- javascript - 用卡片创建幻灯片
- php - 如何验证 Laravel 中的数组输入?
- javascript - 我正在尝试将其他组件链接为我的下拉菜单中的选项 react-router-dom 问题
- c# - 如何让 Dispatcher 实例停止线程?
- android - 无法生成签名的 apk
- mysql - 从 mysql 表中删除唯一键约束
- javascript - 从数组中添加和删除值
- batch-file - 如何在 AutoIt 中编写这个批处理脚本?
- javascript - Phaser:'无法读取未定义的属性'body''