赞
踩
1.心形
- // 心形
- <div class="shape-sub"></div>
-
- .shape-sub:before,.shape-sub:after{
- content: "";
- position: absolute;
- left:50px;
- top:0;
- width:50px;
- height:80px;
- background:red;
- border-radius: 50px 50px 0;
- transform:rotate(-45deg);
- transform-origin: 0 100%;
- }
-
- .shape-sub:after{
- left:0;
- transform: rotate(45deg);
- transform-origin:100% 100%;
- }
2.三角形
- // 三角形
- <div class="triangle-up">向上</div>
-
- <div class="triangle-down">向下</div>
-
- <div class="triangle-left">向左</div>
-
- <div class="triangle-right">向右</div>
-
- .triangle-up{
- width: 0;
- height: 0;
- border-left: 30px solid transparent;
- border-right: 30px solid transparent;
- border-bottom: 30px solid red;
- }
-
-
- .triangle-down {
- width: 0;
- height: 0;
- border-left: 30px solid transparent;
- border-right: 30px solid transparent;
- border-top: 30px solid red;
- }
-
-
- .triangle-left {
- width: 0;
- height: 0;
- border-top: 30px solid transparent;
- border-bottom: 30px solid transparent;
- border-right: 30px solid red;
- }
-
-
- .triangle-right {
- width: 0;
- height: 0;
- border-top: 30px solid transparent;
- border-left: 30px solid red;
- border-bottom: 30px solid transparent;
- }
3.菱形
- // 菱形
- <div class="shape-sub1"></div>
- <div class="shape-sub2"></div>
-
- .shape-sub1 {
- width: 100px;
- height: 60px;
- margin: 50px 0 0 50px;
- transform: skew(30deg);
- background: red;
- }
-
-
- .shape-sub2 {
- width: 100px;
- height: 60px;
- margin: 50px 0 0 50px;
- transform: skew(-30deg);
- background: red;
- }
4.五角星
- // 五角星
- <div class="shape-sub5"></div>
-
- .shape-sub5 {
- display: block;
- position: relative;
- margin: 60px 0;
- color:red;
- width: 0;
- height: 0;
- border-right: 100px solid transparent;
- border-bottom: 70px solid red;
- border-left: 100px solid transparent;
- transform: rotate(35deg);
-
- }
-
- .shape-sub5:before{
- position: absolute;
- top:-45px;
- left:-65px;
- border-left: 30px solid transparent;
- border-right: 30px solid transparent;
- border-bottom: 80px solid red;
- height:0;
- width:0;
- display: block;
- content:"";
- transform: rotate(-35deg);
- }
-
- .shape-sub5:after{
- content:'';
- display: block;
- position: absolute;
- top: 3px;
- left: -105px;
- color: red;
- width:0;
- height:0;
- border-right: 100px solid transparent;
- border-bottom:70px solid red;
- border-left: 100px solid transparent;
- transform:rotate(-70deg);
- }
5.梯形
- // 梯形
- <div class="shape-sub3"></div>
-
- .shape-sub3 {
- width: 60px;
- height: 0;
- margin: 50px 0 0 50px;
- border-left: 30px solid transparent;
- border-right: 30px solid transparent;
- border-bottom: 60px solid red;
- }
6.椭圆形
- // 椭圆形
- <div class="ellipse"></div>
-
- .ellipse {
- width: 200px;
- height: 100px;
- background: red;
- border-radius: 100px / 50px;
- }
7.无限形
- // 无限形
- <div class="infinity"></div>
-
- .infinity {
- position: relative;
- width: 212px;
- height: 100px;
- box-sizing: content-box;
- }
- .infinity:before,
- .infinity:after {
- content: "";
- box-sizing: content-box;
- position: absolute;
- top: 0;
- left: 0;
- width: 60px;
- height: 60px;
- border: 20px solid red;
- border-radius: 50px 50px 0 50px;
- transform: rotate(-45deg);
- }
- .infinity:after {
- left: auto;
- right: 0;
- border-radius: 50px 50px 50px 0;
- transform: rotate(45deg);
- }
8.钻石形
- // 钻石形
- <div class="cut-diamond"></div>
-
- .cut-diamond {
- border-style: solid;
- border-color: transparent transparent red transparent;
- border-width: 0 25px 25px 25px;
- height: 0;
- width: 50px;
- box-sizing: content-box;
- position: relative;
- margin: 20px 0 50px 0;
- }
- .cut-diamond: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;
- }
9.蛋形
- // 蛋形
- <div class="egg"></div>
-
- .egg {
- display: block;
- width: 126px;
- height: 180px;
- background-color: red;
- border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
- }
10.吃人豆
- // 吃人豆
- <div class="pacman"></div>
-
- .pacman {
- width: 0px; height: 0px;
- border-right: 60px solid transparent;
- border-top: 60px solid red;
- border-left: 60px solid red;
- border-bottom: 60px solid red;
- border-top-left-radius: 60px;
- border-top-right-radius: 60px;
- border-bottom-left-radius: 60px;
- border-bottom-right-radius: 60px;
- }
11.气泡
- // 气泡
- <div class="talkbubble"></div>
-
- .talkbubble {
- width: 120px; height: 80px;
- background: red;
- position: relative;
- border-radius: 10px;
- }
-
- .talkbubble:before {
- content: "";
- position: absolute;
- right: 100%; top: 26px;
- border-top: 13px solid transparent;
- border-right: 26px solid red;
- border-bottom: 13px solid transparent;
- }
12.八卦
- // 八卦
- <div class="ba-gua"></div>
-
- .ba-gua {
- width: 96px; height: 48px;
- background: #eee;
- border-color: red;
- border-style: solid;
- border-width: 2px 2px 50px 2px;
- border-radius: 100%;
- position: relative;
- }
- .ba-gua:before {
- content: "";
- position: absolute;
- top: 50%; left: 0;
- background: #fff;
- border: 18px solid red;
- border-radius: 100%;
- width: 12px; height: 12px;
- }
- .ba-gua:after {
- content: "";
- position: absolute;
- top: 50%;
- left: 50%;
- background: red;
- border: 18px solid #eee;
- border-radius: 100%;
- width: 12px;
- height: 12px;
- }
13.放大镜
- // 放大镜
- <div class="magnifying-glass"></div>
-
- .magnifying-glass {
- font-size: 10em;
- display: inline-block;
- width: 0.4em; height: 0.4em;
- border: 0.1em solid red;
- position: relative;
- border-radius: 0.35em;
- }
- .magnifying-glass:before {
- content: "";
- display: inline-block;
- position: absolute;
- right: -0.25em; bottom: -0.1em;
- border-width: 0;
- background: red;
- width: 0.35em; height: 0.08em;
- transform: rotate(45deg);
- }
14.月亮
- // 月亮
- <div class="moon"></div>
-
- .moon {
- width: 80px; height: 80px;
- border-radius: 50%;
- box-shadow: 15px 15px 0 0 red;
- }
15.圆锥形
- // 圆锥形
- <div class="cone"></div>
-
- .cone {
- width: 0; height: 0;
- border-left: 70px solid transparent;
- border-right: 70px solid transparent;
- border-top: 100px solid red;
- border-radius: 50%;
- }
16.指向图形
- // 指向图形
- <div class="pointer "></div>
-
- .pointer {
- width: 100px; height: 40px;
- position: relative;
- background: red;
- }
- .pointer:after {
- content: "";
- position: absolute;
- left: 0; bottom: 0;
- border-left: 20px solid white;
- border-top: 20px solid transparent;
- border-bottom: 20px solid transparent;
- }
- .pointer:before {
- content: "";
- position: absolute;
- right: -20px; bottom: 0;
- border-left: 20px solid red;
- border-top: 20px solid transparent;
- border-bottom: 20px solid transparent;
- }
17.加号
- // 加号
- <div class="cross"></div>
-
- .cross {
- background: red;
- width: 20px; height: 100px;
- position: relative;
- }
- .cross:after {
- background: red;
- content: "";
- width: 100px; height: 20px;
- position: absolute;
- left: -40px; top: 40px;
- }
18.指向箭头
- // 指向箭头
- <div class="curvedarrow"></div>
-
- .curvedarrow {
- position: relative;
- width: 0;
- border-top: 45px solid transparent;
- border-right: 45px solid red;
- transform: rotate(5deg) translateX(100%);
- }
- .curvedarrow:after {
- content: "";
- position: absolute;
- border: 0 solid transparent;
- border-top: 20px solid red;
- border-radius: 100px 0 0 0;
- top: -60px; left: -45px;
- width: 60px; height: 60px;
- transform: rotate(45deg);
- }
19.旗帜
- // 旗帜
- <div class="flag"></div>
-
- .flag {
- width: 80px;
- height: 56px;
- padding-top: 22px;
- position: relative;
- background: red;
- }
- .flag:after {
- content: "";
- position: absolute;
- left: 0;
- bottom: 0;
- border-bottom: 35px solid #fff;
- border-left: 40px solid transparent;
- border-right: 42px solid transparent;
- }
20.锁
- // 锁
- <div class="lock"></div>
-
- .lock {
- font-size: 8px;
- position: relative;
- width: 18em; height: 13em;
- border-radius: 2em;
- top: 10em;
- box-sizing: border-box;
- border: 3.5em solid red;
- border-right-width: 7.5em;
- border-left-width: 7.5em;
- margin: 0 0 6rem 0;
- }
- .lock:before {
- content: "";
- box-sizing: border-box;
- position: absolute;
- border: 2.5em solid red;
- width: 14em; height: 12em;
- left: 50%;
- margin-left: -7em; top: -12em;
- border-top-left-radius: 7em;
- border-top-right-radius: 7em;
- }
- .lock:after {
- content: "";
- box-sizing: border-box;
- position: absolute;
- border: 1em solid red;
- width: 5em; height: 8em;
- border-radius: 2.5em;
- left: 50%; top: -1em;
- margin-left: -2.5em;
- }
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。