你了解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,当然不同的技术所涉及到的代码复杂度和难度也不一样.但是我也有意提到了基于不同方法的实现所体现出的性能表现也不一一相同. [ ...
随机推荐
- laravel 带条件的分页查询
laravel 带条件的分页查询, 原文:http://blog.csdn.net/u011020900/article/details/52369094 bug:断点查询,点击分页,查询条件消失. ...
- backup服务器之rsync服务
backup服务器之rsync服务 rsync是开源的.快速的.多功能的可实现全量及增量的本地或远程数据同步备份的优秀工具.它拥有scp.cp的全量复制功能,同时比scp.cp命令更优秀.更强大. ...
- MUI项目基础框架
码云SVN仓库地址:https://gitee.com/lim2018/vx/tree/master MUI项目基础框架,底部导航栏切换 目录结构 index为入口页主体,sub1-4为要切换的子页面 ...
- 003_Mac挂载NTFS移动硬盘读取VMware虚拟机文件
一.Mac 挂载NTFS移动硬盘进行读写操作 (Read-only file system) 注意如下图所示先卸载,然后按照下图的命令进行挂载.然后cd /opt/003_vm/ &&am ...
- xshell5 优化方案
有道云笔记链接-> grep: 过滤 过滤的速度是最快的(相对于另外两个) -v -n -o 显示grep匹配到了什么 grep . -o -i --ignore-case -E == ...
- 【Android开发】之MediaPlayer的错误分析
最近在做媒体播放器,使用了Android自带的MediaPlayer,经常性会碰到MediaPlayer报错的情况,找过网上的,感觉总结的不是很好或者比较散.下面,我来总结一下使用MediaPlaye ...
- MAVLink v1.0详解——结构
本文针对 MAVLink v1.0版本,协议版本:3. MAVLink是为微型飞行器MAV(Micro Air Vehicle)设计的(LGPL)开源的通讯协议.是无人飞行器和地面站(Ground C ...
- 01 Getting Started 开始
Getting Started 开始 Install the Go tools Test your installation Uninstalling Go Getting help Downlo ...
- python网络编程--进程池
一:进程池 进程池内部维护一个进程序列,当使用时,则去进程池中获取一个进程, 如果进程池序列中没有可供使用的进进程,那么程序就会等待,直到进程池中有可用进程为止. 进程池中有两个方法: apply a ...
- FFmpeg命令行工具和批处理脚本进行简单的音视频文件编辑
FFmpeg_Tutorial FFmpeg工具和sdk库的使用demo 一.使用FFmpeg命令行工具和批处理脚本进行简单的音视频文件编辑 1.基本介绍 对于每一个从事音视频技术开发的工程师,想必没 ...