你了解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,当然不同的技术所涉及到的代码复杂度和难度也不一样.但是我也有意提到了基于不同方法的实现所体现出的性能表现也不一一相同. [ ...
随机推荐
- 当遇到not a dynamic executable时怎么做
当我使用ldd查找Drcom所缺少的32为库的时候提示not a dynamic executable 最后网上找到答案 来自http://forum.ubuntu.org.cn/viewtopic. ...
- perl6: hash小笔记
> ,,, { => , => } > my $a = :%h h => { => , => } > $a.perl :h({, }) > my ...
- ActiveMQ 使用场景
ActiveMQ 安装测试就不做介绍了,下面我说说ActiveMQ 使用场景.(松耦合与ActiveMQ) 1.非均匀应用集成 ActiveMQ 中间件用Java语言编写,因此自然提供Java客户端 ...
- Python基础:内置常量
本文根据Python 3.6.5的官文Built-in Constants编写,官文比较短,大家可以直接看原文. 有一些存在于 内置名称空间(the built-in namespace) 的常量,如 ...
- python网络编程--线程event
一:线程event作用 Python提供了Event对象用于线程间通信,它是线程设置的信号标志,如果信号标志位真,则其他线程等待直到信号结束. Event对象实现了简单的线程通信机制,它提供了设置信号 ...
- docker容器配置独立ip
一般安装docker后都会通过端口转发的方式使用网络,比如 “-p 2294:22” 就将2294抓发到22端口来提供sftp服务,这样使用起来没有问题.但端口号很难记忆,如果前边有nginx等抓发工 ...
- jmert jdbc request支持执行多条sql语句并设置jdbc字符集
1.jdbc request支持执行多条sql语句 在JDBC Connection Configuration中的sql连接字串中添加如下内容 allowMultiQueries=true 如下图: ...
- java基础37 集合框架工具类Collections和数组操作工具类Arrays
一.集合框架工具类:Collections 1.1.Collections类的特点 该工具类中所有的方法都是静态的 1.2.Collections类的常用方法 binarySearch(List< ...
- Oracle 函数 “判断数据表中不存在的数据,才允许通过”
create or replace function mca_detail_material_val(p_material_code VARCHAR2, --实参 p_material_name VA ...
- 再谈OPENCV(转)
转自:http://blog.csdn.net/carson2005/article/details/6979806 尽管之前写过一篇关于OpenCV的介绍(http://blog.csdn.net/ ...