如何使用css做圆形背景? [英] How to make circular background using css?
本文介绍了如何使用css做圆形背景?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我需要做这样的事情。并且我想为< div>< / div>
执行它,它在<$ c中具有 width
$ c>%
I need make something like this. and I want to do it for a <div></div>
which has width
in %
我可以通过使用图片并在其中添加另一个 div
c> z-index 。
I can do this by using an image and adding another div
inside and z-index
.
但我想知道是否可以使用css在backgroud中创建这个圆。
But I want to know if it's possible to make in this circle in backgroud using css.
推荐答案
请检查以下css。 演示
Check with following css. Demo
.circle {
width: 140px;
height: 140px;
background: red;
-moz-border-radius: 70px;
-webkit-border-radius: 70px;
border-radius: 70px;
}
对于更多形状,您可以按照以下网址:
For more shapes you can follow following urls:
http://davidwalsh.name/css-triangles
这篇关于如何使用css做圆形背景?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文