forked from w3c/csswg-drafts
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfloat-side-example.html
38 lines (38 loc) · 1022 Bytes
/
float-side-example.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>wrapping around right side of float area</title>
<!-- lots of hacks to get this to work with the old shape positioning -->
<style>
body {
width: 250px;
}
.shape {
float: left;
width: 100px;
height: 100px;
background-color: lightblue;
-webkit-shape-outside: polygon(50px 0px, 100px 100px, 0px 100px);
-webkit-clip-path: polygon(50px 0px, 100px 100px, 0px 100px);
}
p {
margin: 0;
}
.content-area {
position: absolute;
top: 8px;
width: 100px;
height: 100px;
background-color: #B29BA3;
z-index: -1;
}
</style>
</head>
<body lang="en">
<div class="margin-area"></div>
<div class="content-area"></div>
<div class="shape"></div>
<p>Content only wraps around the right edge of a left float with shape-outside, even if there are open spaces to the left of the float area.</p>
</body>
</html>