一、正方形
div{ background:#F00; width:100px; height:100px;}

 

二、长方形

div{background:#F00;width:200px;height:100px;}

三、圆形

  把宽度(width)与高度(height)值设置为一致(也就是正方形),并且四个圆角值都设置为它们值的一半。

div{width: 100px;height: 100px;background: red;-moz-border-radius: 50px;-webkit-border-radius: 50px;border-radius: 50px;}

四、半圆

 div{width:96px;height:48px;border-top:2px solid red;border-right:2px solid red;border-bottom:50px solid red;/*重点在这里*/border-left:2px solid red; border-radius:100px;}

五、椭圆

div{width: 200px;height: 100px;background: red;-moz-border-radius: 100px / 50px;-webkit-border-radius: 100px / 50px;border-radius: 100px / 50px;}

六、上三角

div{ width: 0;height: 0;border-left: 50px solid transparent;border-right: 50px solid transparent;border-bottom: 100px solid red;}

6、正方形

7、正方形

8、正方形

9、正方形

10、正方形

11、正方形

12、正方形

13、正方形

14、正方形

15、正方形

16、正方形

17、正方形

18、正方形

19、正方形

20、正方形

21、正方形

22、正方形

23、正方形

24、正方形

25、正方形

26、8角星

div {
background: red;
width: 80px;
height: 80px;
position: relative;
text-align: center;
-webkit-transform: rotate(20deg);
-moz-transform: rotate(20deg);
-ms-transform: rotate(20deg);
-o-transform: rotate(20eg);
transform: rotate(20deg);
}
div:before {
content: "";
position: absolute;
top: 0;
left: 0;
height: 80px;
width: 80px;
background: red;
-webkit-transform: rotate(135deg);
-moz-transform: rotate(135deg);
-ms-transform: rotate(135deg);
-o-transform: rotate(135deg);
transform: rotate(135deg);
}

27、钻石

div{
border-style: solid;
border-color: transparent transparent red transparent;
border-width: 0 25px 25px 25px;
height: 0;
width: 50px;
position: relative;
margin: 20px 0 50px 0;
}
div:after {
content: "";
position: absolute;
top: 25px;
left: -25px;
width: 0;
height: 0;
border-style: solid;
border-color: red transparent transparent transparent;
border-width: 70px 50px 0 50px;
}

28、阴阳八卦

div {
width: 96px;
height: 48px;
background: #eee;
border-color: #000;
border-style: solid;
border-width: 2px 2px 50px 2px;
border-radius: 100%;
position: relative;
} div:before {
content: "";
position: absolute;
top: 50%;
left: 0;
background: #eee;
border: 18px solid #000;
border-radius: 100%;
width: 12px;
height: 12px;
} div:after {
content: "";
position: absolute;
top: 50%;
left: 50%;
background: #000;
border: 18px solid #eee;
border-radius:100%;
width: 12px;
height: 12px;
}

CSS3_边框属性之圆角的基本图形案例的更多相关文章

  1. CSS3_边框属性之圆角

    一.border-radius是向元素添加圆角边框: border-radius的值不仅能用px单位,你还可以用百分比或者em,但兼容性目前还不太好.(都不能是负值) 1.border-radius ...

  2. 前端1-----CSS颜色属性,字体文本和背景属性,边框属性,margin和padding,盒模型,行内块转换,浮动,三大定位

    前端1-----CSS颜色属性,字体文本和背景属性,边框属性,margin和padding,盒模型,行内块转换,浮动,三大定位 一丶css选择器的优先级 行内 > id选择器 > 类选择器 ...

  3. css3设置边框属性

    css设置边框属性:设置边框圆角 <!DOCTYPE html> <html> <head lang="en"> <meta charse ...

  4. WPF将TextBox的边框设为圆角的

    将TextBox的边框设为圆角的,因为TextBox默认的样式中边框就是由Border类型来实现的, 所以只需要真的当前的TextBox的Border修改属性即可,为了不影响界面中别的Border的样 ...

  5. CSS3的新增边框属性

    一.CSS3 新增的边框属性 属性 版本 简介 border-image CSS3 设置或检索对象的边框使用图像来填充 border-image-source CSS3 设置或检索对象的边框是否用图像 ...

  6. Web前端篇:CSS常用格式化排版、盒模型、浮动、定位、背景边框属性

    目录 Web前端篇:CSS常用格式化排版.盒模型.浮动.定位.背景边框属性 1.常用格式化排版 2.CSS盒模型 3.浮动 4.定位 5.背景属性和边框属性 6.网页中规范和错误问题 7.显示方式 W ...

  7. IT兄弟连 HTML5教程 CSS3属性特效 圆角

    传统的圆角生成方案,必须使用多张图片作为背景图案.CSS3的出现,使得我们再也不必浪费时间去制作这些图片了,只需要border-radius属性,支持浏览器IE 9.Opera 10.5.Safari ...

  8. CSS的背景属性和边框属性

    CSS的背景属性: background 简写属性,作用是将背景属性设置在一个声明中 background-attachment 背景图像是否固定或者随着页面的其余部分滚动 background-co ...

  9. border边框属性

    边框属性: 边框宽度(border-width):thin.medium.thick.长度值 边框颜色(border-color):颜色.transparent(透明) 边框样式(border-sty ...

随机推荐

  1. 【20160924】GOCVHelper MFC增强算法(5)

    CString ExportListToExcel(CString  sExcelFile,CListCtrl* pList, CString strTitle)     {         CStr ...

  2. view class source code with JAD plugin in Eclipse

    The default class viewer doesn't decompile the class file so you cannot open and check the source co ...

  3. CodeBlocks养眼的colour theme

    把如下的代码复制粘贴到这个文件:default.conf <?xml version="1.0" encoding="UTF-8" standalone= ...

  4. javascript + jquery函数大全

    JAVASCRIPT Array 函数   array创建数组 concat()连接两个或更多的数组,并返回结果. join()把数组中所有元素组成字符串. pop()删除并返回数组的最后一个元素 s ...

  5. codevs1137 计算系数

    1137 计算系数 2011年NOIP全国联赛提高组  时间限制: 1 s  空间限制: 128000 KB  题目等级 : 黄金 Gold 题解       题目描述 Description 给定一 ...

  6. 获取某个数据所在数据列表中的行数 mysql

    select * from (select @rownum := @rownum+1 as rownum,goods_idfrom table_goods, (select @rownum:=0) t ...

  7. iOS日常工作之常用宏定义大全

    前言: 在工作中, 很多小伙伴都会在PCH文件定义一些常用的宏,但是又怕写这些简单的宏浪费时间,又有时候忘记怎么定义了怎么办?本人在工作中也是如此.所以在这里给大家分享一些常用的宏定义,喜欢的小伙伴可 ...

  8. 多线程&NSObject&NSThread&NSOperation&GCD

    1.NSThread 每个NSThread对象对应一个线程,量级较轻(真正的多线程) 以下两点是苹果专门开发的“并发”技术,使得程序员可以不再去关心线程的具体使用问题 2.NSOperation/NS ...

  9. php文本里 php和html代码谁先执行谁啊

    php文本里 php和html代码谁先执行谁啊 比如php里包含一个html文本,然后html代码里又包含了一个php文本,是按照谁先包含谁被服务器执行吗,即先执行php ,再执行里面的html,然后 ...

  10. GenericServlet,HttpServletRequest和HttpServletResponse

    最基本的是通过实现Servlet接口来编写Servlet类,这需要实现Servlet接口中定义的5个方法. 为了简化Servlet的编写,在javax.servlet包中提供了一个抽象类Generic ...