NIUCLOUD是一款SaaS管理后台框架多应用插件+云编译。上千名开发者、服务商正在积极拥抱开发者生态。欢迎开发者们免费入驻。一起助力发展! 广告
1. 使用background-clip 可以指定背景区域 如: ~~~ .box { width: 10px; height: 10px; padding: 5px; border-radius: 50%; border:2px solid; background: #09bb07; background-clip: content-box; } <div class="box"></box> ~~~ ![](https://box.kancloud.cn/245cee26662b01c8724a652936bde38d_56x37.png) 通过background-clip指定背景颜色作用的区域,通过padding制定 空白的地方,再用border设置外边框的颜色。这样就可以绘制图形了