你了解border-radius吗?
1、圆角正方形

.rounded-square{
width: 200px;
height: 200px;
background-color: pink;
border-radius: 50px;
}
当border-radius的值为一个时,它的最大有效值为“盒子最短边的二分之一”。
2、正圆

.circle{
width: 200px;
height: 200px;
background-color: pink;
border-radius: 100px;
}
3、圆角矩形

.rounded-rectangle{
width: 200px;
height: 100px;
background-color: pink;
border-radius: 50px;
}
4、不规则圆角

.not-regular-round{
width: 200px;
height: 200px;
background-color: pink;
border-top-left-radius: 100px;
border-top-right-radius: 50px;
border-bottom-right-radius: 10px;
border-bottom-left-radius: 25px;
}
简写
.not-regular-round{
width: 200px;
height: 200px;
background-color: pink;
border-radius: 100px 50px 10px 25px;
}
5、半圆

.half-circle{
width: 200px;
height: 100px;
background-color: pink;
border-radius: 200px 200px 0 0;
}
6、四分之一圆

.quarter-circle{
width: 200px;
height: 200px;
background-color: pink;
border-radius: 200px 0 0 0;
}
7、不是圆角矩形,也不是矩形,也不是椭圆

.strange-rectangle{
width: 200px;
height: 100px;
background-color: pink;
border-radius: 70px / 30px;
}
8、椭圆

.ellipse{
width: 200px;
height: 100px;
background-color: pink;
border-radius: 100px / 50px;
}
9、一半椭圆

.half-ellipse{
width: 200px;
height: 100px;
background-color: pink;
border-radius: 200px 0 0 200px / 50px 0 0 50px;
}
10、四分之一椭圆

.quarter-ellipse{
width: 200px;
height: 100px;
background-color: pink;
border-radius: 200px 0 0 0 / 100px 0 0 0;
}
11、一只站着的鸡蛋

.stand-egg{
width: 100px;
height: 200px;
background-color: pink;
border-radius: 50px 50px 50px 50px / 150px 150px 50px 50px;
}
12、一片叶子

.a-leaf{
width: 200px;
height: 200px;
background-color: pink;
border-radius: 200px 0 200px 0;
}
13、一片站着的歪叶子

.a-stand-strange-leaf{
width: 100px;
height: 200px;
background-color: pink;
border-radius: 200px 0 200px 0;
}
14、一片躺着的歪叶子

.a-sleep-strange-leaf{
width: 200px;
height: 100px;
background-color: pink;
border-radius: 200px 0 200px 0;
}
15、爱因为在心中

<div class="love-shape-box">
<div class="left-love-shape"></div>
<div class="right-love-shape"></div>
</div>
.love-shape-box{
display: flex;
justify-content: center;
align-items: center;
height: 400px;
}
.left-love-shape{
width: 100px;
height: 170px;
background-color: red;
border-radius: 50px 50px 0px 0;
transform-origin: 50px 50px;
transform: rotate(-45deg);
}
.right-love-shape{
width: 100px;
height: 170px;
background-color: red;
border-radius: 50px 50px 0px 0;
transform-origin: 50px 50px;
transform: rotate(45deg);
}
16、环带
把上面的形状的背景换成边框border: 50px solid pink;即可得到圆环。。。
你了解border-radius吗?的更多相关文章
- 重温CSS:Border属性
边界是众所周知的,有什么新的东西吗?好吧,我敢打赌,在这篇文章中,有很多你不看永远不知道的东西! 不仅可以用CSS3来创建圆角,使用原有CSS一样可以显示自定义图形.这是正确的(有待考究):在过去,没 ...
- jquery/zepto 圣诞节雪花飞扬
下载地址: http://www.html5tricks.com/jquery-html5-christ-snow.html 演示地址: http://www.html5tricks.com/jque ...
- 为 Web 设计师准备的 20 款 CSS3 工具
1.CSS3 Generator 2. Border Radius 3. CSS3 Maker 4. CSS3 Transforms 5. CSS3 Drop shadow generator 6. ...
- jQuery实践——属性和css篇
属性: attr html:<div>demo1</div> jQuery:$("div").attr("id","demo1 ...
- Designing for iOS: Graphics & Performance
http://robots.thoughtbot.com/designing-for-ios-graphics-performance [原文] In the previous article, w ...
- Quartz2D复习(一)--- 基础知识 / 绘制线段圆弧 / 图片水印 / 截图
1.Quartz 2D是一个二维绘图引擎,同时支持ios和Mac系统: Quart2D的API是纯C语言的,API来自于Core Graphics框架: 2.Quartz 2D可以绘制图形(线段/三 ...
- [css]需警惕CSS3属性的书写顺序
转载张鑫旭:http://www.zhangxinxu.com/wordpress/2010/09/%E9%9C%80%E8%AD%A6%E6%83%95css3%E5%B1%9E%E6%80%A7% ...
- 为什么要使用sass
或许你已经听过一个叫作Sass的东东?可能你已经了解它,并且你能像大师一样写出一些函数? 对于不清楚我在讲什么的读者或者客户,你们可以想想web开发过程,你们的期望和站点用户的体验想要怎样的.无论如何 ...
- CSS模版收集
Css Reset by Eric MeyerURL:http://www.ahrefmagazine.com/web-design/30-useful-css-snippets-for-develo ...
- iOS图形处理和性能(转)
在之前的文章里,我们探讨了基于多种不同技术来实现自定义的UIButton,当然不同的技术所涉及到的代码复杂度和难度也不一样.但是我也有意提到了基于不同方法的实现所体现出的性能表现也不一一相同. [ ...
随机推荐
- Happy Matt Friends(HDU5119 + dp)
题目链接: http://acm.hdu.edu.cn/showproblem.php?pid=5119 题目: 题意: 求选择任意个数,使其异或和大于等于m的方案数. 思路: 每个数有选和不选两种方 ...
- 苹果手机浏览器$(document).on(“click”,function(){})点击无效的问题
<label class="js_highlight" style="display: inline-block;float: left;width: 50%;&q ...
- js 禁用右键菜单、拖拽、选中、复制
//禁用拖拽 document.ondragstart = function () { return false; }; /** * 禁用右键菜单 */ document.oncontextmenu ...
- 数位DP入门(A - 不要62 HDU - 2089 &&B - Bomb HDU - 3555 )
题目链接:https://cn.vjudge.net/contest/278036#problem/A 具体思路:对于给定的数,我们按照位数进行运算,枚举每一位上可能的数,在枚举的时候需要注意几个条件 ...
- PyText
Facebook开源了自家工程师们一直在用的NLP建模框架PyText.这个框架,每天要为Facebook旗下各种应用处理超过10亿次NLP任务,Facebook AI的工业级NLP开源框架.(简化部 ...
- springCloud全实战超详细代码demo+笔记
码云: https://gitee.com/houzheng1216/springcloud
- Linux中断处理驱动程序编写【转】
转自:http://blog.163.com/baosongliang@126/blog/static/1949357020132585316912/ 本章节我们一起来探讨一下Linux中的中断 中断 ...
- 一、Vue入门
vue官网:https://cn.vuejs.org/ 学习路线:VueJs2.0建议学习路线 在浏览器上安装 Vue Devtools工具 1.vue入门 <script src=" ...
- vue总结 06组件
组件基础 基本示例 这里有一个 Vue 组件的示例: // 定义一个名为 button-counter 的新组件Vue.component('button-counter', { data: func ...
- python3实现socket通信
目的:实现两台机器之间的通信.也就是说一个作为服务端(时刻监听接收数据),另一个作为客户端(发送数据). Python实现的过程个人理解: 1.服务端开始监听. 2.客户端发起连接请求. 3.服务端收 ...