border家族
border-style:dotted solid double dashed(上边框是点状,右边框是实线,下边框是双线,左边框是虚线)边框样式;
border-width(边框宽度);
border-radius(创建圆角);
border-color(边框颜色);
border-shadow(添加阴影);
案例1:太极图
HTML:
<div id="a1"></div>
CSS:
#a1 { width: 96px !important; height: 48px !important; background: #fff; border-color: #E8339B; border-style: solid;border-width: 2px 2px 50px 2px; border-radius: 100%; position: relative; }

#a1:before { content: ""; position: absolute; top: 50%; left: 0; background: #fff;border: 18px solid #E8339B; border-radius: 100%; width: 12px; height: 12px; }
#a1:after { content: ""; position: absolute; top: 50%; left: 50%; background: #E8339B;border: 18px solid #fff; border-radius:100%; width: 12px; height: 12px; }
最终效果:

案例2:三角
HTML:
<div id="b1"></div>
CSS:
#b1 { width: 0;height: 0;border-left: 50px solid transparent;border-right: 50px solid transparent;border-bottom: 100px solid red;}




同理,
三角形向下:
#b1 { width: 0;height: 0;border-left: 50px solid transparent;border-right: 50px solid transparent;border-top: 100px solid #d40834;}
三角形right:
#b1 { width: 0;height: 0;border-left: 100px solid #d40834;border-right: 50px solid transparent;border-top: 100px solid #d40834;}
三角形left:
#b1 { width: 0;height: 0;border-left: 50px solid transparent;border-right: 100px solid #d40834;border-top: 100px solid #d40834;}




三角形top left:
#b1 { width: 0;height: 0; border-top: 100px solid red;border-right: 100px solid transparent;}
三角形top right:
#b1 { width: 0;height: 0;border-left: 100px solid transparent;border-top: 100px solid #d40834;}
三角形bottom right:
#b1 { width: 0;height: 0;border-left: 100px solid transparent;border-bottom: 100px solid #d40834;}
三角形bottom left:
#b1 { width: 0;height: 0;border-right: 100px solid transparent;border-top: 100px solid #d40834;}
border家族的更多相关文章
- JavaScript动画:offset家族和匀速动画详解(含轮播图的实现)
本文最初发表于博客园,并在GitHub上持续更新前端的系列文章.欢迎在GitHub上关注我,一起入门和进阶前端. 以下是正文. offset家族简介 我们知道,三大家族包括:offset/scroll ...
- 三大家族,offset,scroll,client
1.client 1.1主要成员 1.clientWidth 获取网页可视区域宽度(两种用法) clientHeight 获取网页可视区域高度 (两张用法) 盒子调用: 指盒子本省 浏览器调用: ...
- 三大家族(offset、scroll、client)
offset.scroll.client三大家族 offset家族 offsetWidth 与 offsetHeight offset 偏移 用于获取元素自身的位置和大小 offsetWidth和of ...
- client家族属性
在前面总结了offset家族属性和scroll家族属性,今天来总结一下client家族属性,同前面一样,client家族也包宽高和左上,具体的通过代码来区别这三大家族属性的不同. <!DOCTY ...
- offse家族属性
在JavaScript中,常用offset.scroll和client家族属性来表示元素的位置和大小相关属性,最近在网上找到了一张图来表示三者之间的关系,正好可以在此借鉴一下. 本次主要来看一下off ...
- JS学习 - offset家族(一)
JS学习 - offset家族(一) 先来张图开开胃 offsetWidth offetHeight 得到对象的宽度和高度(自己的,与他人无关) offsetWidth = width + borde ...
- css之背景(background)家族
背景(background)是css中很重要的一部分,也是css的基础知道之一,现在来回顾css2中5个属性与css3中新增的3个属性和2个功能. CSS2_背景(background)前传 家族成员 ...
- js中对象的一些特性,JSON,scroll家族
一.js中对象的一些特性 对象的动态特性 1.当对象有这个属性时,会对属性的值重写 2.当对象没有这个属性时,会为对象创建一个新属性,并赋值 获得对象的属性的方式 为元素设置DOM0级事件 二.JSO ...
- javascript总结46: JS三大系列-方便的offset 家族
1 offset 家族 offset这个单词本身是--偏移,补偿,位移的意思. js中有一套方便的获取元素尺寸的办法就是offset家族: 2 offset 结构介绍为: 3 offset常用属性 ...
随机推荐
- maven 打war包tomcat服务器乱码问题
今天用maven3的命令打war包,命令是mvn clean package -Dmaven.test.skip=true,打包后放在tomcat跑起来后发现tomcat的日志出现乱码. 后来在pom ...
- AngularJS控制器
AngularJS 控制器 控制 AngularJS 应用程序的数据,控制器是常规的 JavaScript 对象. 1. angular.module(name, [requires], [confi ...
- java中post时中文乱码
http://blog.chinaunix.net/uid-12348673-id-3335300.html 设置流的编码,就避免了乱码 public static String post(Strin ...
- Bootstrap Affix(附加导航(Affix)插件的用法)
原文网址:http://www.runoob.com/bootstrap/bootstrap-affix-plugin.html Bootstrap 附加导航(Affix)插件 附加导航(Affix) ...
- mac攻略(七) -- 环境变量PATH分析
一.首先需要了解 1>mac 一般使用bash作为默认shell 2>Mac系统的环境变量,加载顺序为: 1.系统级别的 /etc/profile /etc/bashrc /etc/p ...
- [转]Part2: Understanding !PTE, Part2: Flags and Large Pages
http://blogs.msdn.com/b/ntdebugging/archive/2010/04/14/understanding-pte-part2-flags-and-large-pages ...
- 【Python】Django
数据表更改 Django 1.7.x 和后来的版本: Django 1.7.x 及以后的版本集成了 South 的功能,在修改models.py了后运行: python manage.py makem ...
- 【Python】Python3中的str和bytes
参考文章:Python 3的bytes/str之别 len()函数计算的是str的字符数,如果换成bytes,len()函数就计算字节数 >>> len('ABC') 3 >& ...
- 最全面的常用正则表达式大全 zz
很多不太懂正则的朋友,在遇到需要用正则校验数据时,往往是在网上去找很久,结果找来的还是不很符合要求.所以我最近把开发中常用的一些正则表达式整理了一下,包括校验数字.字符.一些特殊的需求等等.给自己留个 ...
- 1006. Sign In and Sign Out (25)
At the beginning of every day, the first person who signs in the computer room will unlock the door, ...