We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a29320f commit ba4b7ccCopy full SHA for ba4b7cc
常用的CSS主流布局案例(1~8)/12_拐角丝带.html
@@ -0,0 +1,34 @@
1
+<!DOCTYPE html>
2
+<html lang="en">
3
+<head>
4
+ <meta charset="UTF-8">
5
+ <title>css实现拐角丝带</title>
6
+ <style>
7
+ .container {
8
+ position: relative;
9
+ border: 1px solid #ddd;
10
+ min-height: 200px;
11
+ overflow: hidden;
12
+ }
13
+ .container-ribbon {
14
+ height: 24px;
15
+ width: 206px;
16
+ position: absolute;
17
+ top: 32px;
18
+ left: -64px;
19
+ transform: rotate(-45deg);
20
+ background-color: red;
21
+ text-align: center;
22
+ color: #fff;
23
24
+ </style>
25
+</head>
26
+<body>
27
+<div class="container">
28
+<!-- 丝带 -->
29
+ <div class="container-ribbon">hot</div>
30
+<!-- 内容区 -->
31
+ <div class="container-content">...</div>
32
+</div>
33
+</body>
34
+</html>
0 commit comments