html - 如何使用css创建带有状态圈的圈子头像?
问题描述
我将创建一个像这张图片一样的头像。我怎么能用css做到这一点? 带有状态圈的头像
解决方案
您可以执行以下操作:
.img-circle-small {
width: 53px;
height:55px;
border-top-left-radius: 50% 50%;
border-top-right-radius: 50% 50%;
border-bottom-right-radius: 50% 50%;
border-bottom-left-radius: 50% 50%;
border: 2px solid #CCC;
margin-bottom: 2px;
}
.status{
width: 16px;
height:16px;
border-top-left-radius: 50% 50%;
border-top-right-radius: 50% 50%;
border-bottom-right-radius: 50% 50%;
border-bottom-left-radius: 50% 50%;
border: 2px solid #CCC;
margin-bottom: 2px;
background-color: green;
position: absolute;
}
.temp{
position: relative;
display: inline-block;
}
.topRight{
top: 0;
right: 0;
}
<div class="temp">
<img src="https://www.pngitem.com/pimgs/m/206-2067982_thinking-boy-clipart-and-cliparts-for-free-transparent.png" alt="avatar" class="img-circle-small">
<span class="status topRight"> </span>
</div>
推荐阅读
- javascript - import * as & import { default as } 的区别
- sas - 在 sas 比较中,仅输出差异和新记录
- python - Python Matplotlib:将轴设置为相对于一个值的增量
- java - 使用 PreBuiltTransportClient 调用 elasticsearch
- python - 用它们的计数替换嵌套列表中的元素
- javascript - QueryDocumentSnapshot 似乎缺少其父类的方法
- c++ - 将指向数组的指针传递给 C 和 C++ 中的函数的两个不同结果?
- terraform - Terraform HCL 中的集合或模板
- office365 - 在 Microsoft Teams 中禁用 PowerBI 选项卡
- c# - Dynamic Query Builder for ASP.Net-MVC - 使用 jQuery QueryBuilder、DataTables 和 dynamic-linq-query-builder