File tree Expand file tree Collapse file tree 1 file changed +41
-0
lines changed Expand file tree Collapse file tree 1 file changed +41
-0
lines changed Original file line number Diff line number Diff line change
1
+ <!DOCTYPE html>
2
+ < html lang ="en ">
3
+ < head >
4
+ < meta charset ="UTF-8 ">
5
+ < meta http-equiv ="X-UA-Compatible " content ="IE=edge ">
6
+ < meta name ="viewport " content ="width=device-width, initial-scale=1.0 ">
7
+ < title > Document</ title >
8
+ < style >
9
+ .badge-ribbon {
10
+ position : relative;
11
+ background : red;
12
+ height : 100px ;
13
+ width : 100px ;
14
+ border-radius : 50% ;
15
+ margin-left : 10px ;
16
+ }
17
+ /* 绘制两角三角形 */
18
+ .badge-ribbon ::before ,
19
+ .badge-ribbon ::after {
20
+ content : "" ;
21
+ position : absolute;
22
+ border-left : 40px solid transparent;
23
+ border-right : 40px solid transparent;
24
+ border-bottom : 70px solid red;
25
+ top : 70px ;
26
+ }
27
+ /* 控制三角形位置和旋角度 */
28
+ .badge-ribbon ::before {
29
+ left : -10px ;
30
+ transform : rotate (-140deg );
31
+ }
32
+ .badge-ribbon ::after {
33
+ right : -10px ;
34
+ transform : rotate (140deg );
35
+ }
36
+ </ style >
37
+ </ head >
38
+ < body >
39
+ < div class ="badge-ribbon "> </ div >
40
+ </ body >
41
+ </ html >
You can’t perform that action at this time.
0 commit comments