找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索本站精品资源

首页 教程频道 查看内容

css怎么画圆

作者:模板之家 2021-4-20 19:09 148人关注

css画圆的方法:首先设置div元素的宽高相等;然后使用border-radius属性来画圆,语法格式为“border-radius:50%”。border-radius属性设置元素的外边框圆角,使用一个半径时确定一个圆形。

css画圆的方法:首先设置div元素的宽高相等;然后使用border-radius属性来画圆,语法格式为“border-radius:50%”。border-radius属性设置元素的外边框圆角,使用一个半径时确定一个圆形。

本教程操作环境:windows7系统、CSS3&&HTML5版、Dell G3电脑。

border-radius 属性是一个简写属性,用于设置四个 border-*-radius 属性。

提示:该属性允许您为元素添加圆角边框!

注释:按此顺序设置每个 radii 的四个值。如果省略 bottom-left,则与 top-right 相同。如果省略 bottom-right,则与 top-left 相同。如果省略 top-right,则与 top-left 相同。

设置前:

<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>document</title> 
<style> 
div{ 
    width: 100px;
    height: 100px;
    border: 1px solid rgb(255, 113, 113);
    }
</style>
</head>
<body>
<div></div>
</body>
</html>

效果:

XCD6Z(~X}1QEC~GWTV_6I2E.png

设置后:

border-radius: 50%;

效果:

`P~@WV5~JF%)F90AB`]B8$B.png

推荐学习:css视频教程

以上就是css怎么画圆的详细内容,更多请关注模板之家(www.mb5.com.cn)其它相关文章!


路过

雷人

握手

鲜花

鸡蛋
来自: 网络收集

全部回复(0)