查看“︁CSS/画圆”︁的源代码
来自康健生活
←
CSS/画圆
因为以下原因,您没有权限编辑该页面:
您请求的操作仅限属于该用户组的用户执行:
用户
您可以查看和复制此页面的源代码。
== 引言 == {| class="wikitable" |- ! html !! css !! |- | <syntaxhighlight lang="html5"> <div></div></syntaxhighlight> || <syntaxhighlight lang="css"> div { width: 100px; height: 100px; background: #ffffff; border-radius: 50%; border: 5px solid red; }</syntaxhighlight> || [[文件:Css 画圆 1.png|200px|左|Css 画圆 1]] |- | <syntaxhighlight lang="html5"> <div id="advanced" class="circle"></div></syntaxhighlight> || <syntaxhighlight lang="css"> .circle { border-radius: 50%; width: 200px; height: 200px; /* 宽度和高度需要相等 */ } /* 动画定义 */ @keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } } /* 旋转,渐变色 */ #advanced { width: 200px; height: 200px; background-image: -moz-radial-gradient(45px 45px 45deg, circle cover, yellow 0%, orange 100%, red 95%); background-image: -webkit-radial-gradient(45px 45px, circle cover, yellow, orange); background-image: radial-gradient(45px 45px 45deg, circle cover, yellow 0%, orange 100%, red 95%); animation-name: spin; animation-duration: 3s; /* 3 seconds */ animation-iteration-count: infinite; animation-timing-function: linear; }</syntaxhighlight> || 示例 |- | 示例 || 示例 || 示例 |}
返回
CSS/画圆
。
导航菜单
康健生活
搜索
user-page
通知
user-interface-preferences
个人工具
登录
五一
多读书,多运动,多到远处走走,再看看不一样的世界。