css 画一个100px的红色圆
时间: 2023-11-12 07:08:37 浏览: 33
可以使用以下 CSS 代码来画一个100px的红色圆:
```
<style>
.circle {
width: 100px;
height: 100px;
border-radius: 50%;
background-color: red;
}
</style>
<div class="circle"></div>
```
相关问题
用css画一个红色的圆
可以这样用 CSS 画一个红色的圆:
```css
.circle {
width: 50px;
height: 50px;
border-radius: 25px;
background-color: red;
}
```
如果你想用 CSS 画一个更大或更小的圆,可以改变 `width` 和 `height` 的值。如果你想改变圆的颜色,可以修改 `background-color` 的值。
css画一个边缘有点模糊小圆形
可以使用CSS的box-shadow属性来实现边缘模糊的小圆形。具体代码如下:
```css
.circle {
width: 50px;
height: 50px;
border-radius: 50%;
background-color: #f00;
box-shadow: 0 0 10px rgba(255, 0, 0, 0.5);
}
```
上述代码中,使用了border-radius属性将元素变成了一个圆形,使用background-color属性设置了圆形的背景颜色为红色。而box-shadow属性则是用来设置圆形边缘的模糊效果的,其中0 0表示不偏移阴影的位置,10px表示阴影扩散的距离,rgba(255, 0, 0, 0.5)表示阴影的颜色为半透明的红色。
这样就可以得到一个边缘模糊的小圆形了。