CSS/HTML

推荐列表 站点导航

当前位置:首页 > 脚本编程 > CSS/HTML >

如何利用css实现圆环效果

来源:网络整理  作者:  发布时间:2020-12-19 09:09
CSS教程:本文为大家分享了css实现圆环效果的代码,具有一定的参考价值,希望可以帮助到大家。要实现圆环效果,...

接下来为大家介绍方法:

<div class="element6"></div>.element6{ width: 200px; height: 200px; border-radius: 50%; background: -webkit-radial-gradient( circle closest-side,#009966 50%,lightpink 50%); }

以上就是如何利用css实现圆环效果的详细内容,更多请关注聚合云库其它相关文章!

<div class="element4"></div>.element4{ width: 100px; height: 100px; background-color: #009966; border-radius: 50%; box-shadow: 0 0 0 50px lightpink ; margin: auto; }<div class="element5"> .element5{ width: 200px; height: 200px; background-color: #009966; border-radius: 50%; box-shadow: 0 0 0 50px lightpink inset; margin: auto; }

5、使用radial-gradient

<div class="element3"></div> .element3{ width: 100px; height: 100px; background-color: #009966; border-radius: 50%; border: 50px solid lightpink ; }

(学习视频推荐:css视频教程

<div class="element2"></div>.element2{ width: 200px; height: 200px; background-color: lightpink; border-radius: 50%; } .element2:after{ content: ""; display: block; width: 100px; height: 100px; border-radius: 50%; background-color: #009966; position: relative; top: 50px; left: 50px; }

3、使用border:

首先我们来看一下实现效果:

如何利用css实现圆环效果

d03382e71b96b7d8bc5b748b2931994.png

(推荐教程:CSS教程

4、使用border-shadow

1、两个标签的嵌套

css实现圆环效果有多种方法,这里为大家分享五种方法:
<div class="element1"> <div class="child1"></div> </div>.element1{ width: 200px; height: 200px; background-color: lightpink; border-radius: 50%; } .child1{ width: 100px; height: 100px; border-radius: 50%; background-color: #009966; position: relative; top: 50px; left: 50px; }

2、使用伪元素,before/after

相关热词: CSS

本站内容来源于网络,如有侵权请与我们联系,我们会及时删除,我们深感抱歉!
注:本站所有信息仅供用于网络技术学习参考,学习中请遵循相关法律法规!

本文地址: https://v30.fanwenzhu.com/jiaob/cssm/5549.shtml

Copyright © www.juheyunku.com      关于 | 合作 | 声明 | 联系 | 更新 | 地图 | Tags

如何利用css实现圆环效果

2020-12-19 编辑:

接下来为大家介绍方法:

<div class="element6"></div>.element6{ width: 200px; height: 200px; border-radius: 50%; background: -webkit-radial-gradient( circle closest-side,#009966 50%,lightpink 50%); }

以上就是如何利用css实现圆环效果的详细内容,更多请关注聚合云库其它相关文章!

<div class="element4"></div>.element4{ width: 100px; height: 100px; background-color: #009966; border-radius: 50%; box-shadow: 0 0 0 50px lightpink ; margin: auto; }<div class="element5"> .element5{ width: 200px; height: 200px; background-color: #009966; border-radius: 50%; box-shadow: 0 0 0 50px lightpink inset; margin: auto; }

5、使用radial-gradient

<div class="element3"></div> .element3{ width: 100px; height: 100px; background-color: #009966; border-radius: 50%; border: 50px solid lightpink ; }

(学习视频推荐:css视频教程

<div class="element2"></div>.element2{ width: 200px; height: 200px; background-color: lightpink; border-radius: 50%; } .element2:after{ content: ""; display: block; width: 100px; height: 100px; border-radius: 50%; background-color: #009966; position: relative; top: 50px; left: 50px; }

3、使用border:

首先我们来看一下实现效果:

如何利用css实现圆环效果

d03382e71b96b7d8bc5b748b2931994.png

(推荐教程:CSS教程

4、使用border-shadow

1、两个标签的嵌套

css实现圆环效果有多种方法,这里为大家分享五种方法:
<div class="element1"> <div class="child1"></div> </div>.element1{ width: 200px; height: 200px; background-color: lightpink; border-radius: 50%; } .child1{ width: 100px; height: 100px; border-radius: 50%; background-color: #009966; position: relative; top: 50px; left: 50px; }

2、使用伪元素,before/after

本站内容来源于网络,如有侵权请与我们联系,我们会及时删除,我们深感抱歉!
注:本站所有信息仅供学习参考!
本文地址为 https://v30.fanwenzhu.com/jiaob/cssm/5549.shtml

相关文章

风云图片

推荐阅读

返回CSS/HTML频道首页