解决方法
是的,这是可能的 – 见:
HTML:
<div class='circle'> <div class='arc'></div> </div>
CSS:
.circle { position: relative; margin: 7em auto; width: 16em; height: 16em; border-radius: 50%; background: lightblue; } .arc { overflow: hidden; position: absolute; /* make sure top & left values are - the width of the border */ /* the bottom right corner is the centre of the parent circle */ top: -1em; right: 50%; bottom: 50%; left: -1em; /* the transform origin is the bottom right corner */ transform-origin: 100% 100%; /* rotate by any angle */ /* the skew angle is 90deg - the angle you want for the arc */ transform: rotate(45deg) skewX(30deg); } .arc:before { Box-sizing: border-Box; display: block; border: solid 1em navy; width: 200%; height: 200%; border-radius: 50%; transform: skewX(-30deg); content: ''; }
原文地址:https://www.jb51.cc/html5/168994.html
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。