-
Notifications
You must be signed in to change notification settings - Fork 708
/
Copy pathmulti-column-region.html
92 lines (82 loc) · 2.48 KB
/
multi-column-region.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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
<html>
<head>
<style>
body{
font-family:"Georgia", serif;
width: 50ex;
margin-left: auto;
margin-right: auto;
}
#multi-col {
-webkit-column-count: 2;
height: 6em;
}
#regular-div {
width: 100%;
height: auto;
margin-top: 2em;
}
#article {
-webkit-flow-into: article;
color:#777;
font-size: 12px;
font-weight: normal;
text-align: justify;
}
.article-content{
-webkit-flow-from: article;
}
#article > h1#intro {
color: crimson;
display: run-in;
font-size: 16px;
padding-right: 14px;
}
#article > h1#more {
color: #777;
font-weight: bold;
font-size: 16px;
border-left: 1px solid #777;
padding-left: 10px;
}
</style>
</head>
<body>
<div id="article">
<h1 id="intro">Introduction</h1>
<p>
<span id="larger">This is an example that shows how content
can be made to flow between multiple regions. The image is
displayed in</span> the region 'A'. The 'article' is flowed from
region '1', to region '2', to region '3' and finally to region
'4'. Note how the content that is laid out in 'region 1' is
subject to a different style.
</p>
<h1 id="more">More Details</h1>
<p>
This illustrates some of the features of CSS Regions. First,
the ability to associate a flow of content to a set of
regions and effectively getting that content to be threaded
from one region to the next.
</p>
</p>
Then, the example illustrates the concept of 'region styling',
where the content that falls into a specific region is subject
to additional style rule, in the same spirit as inline content
falling in the 'first line' can be subject to additional styling
as defined by the ::first-line pseudo element selector.
</p>
<p>
Finally, this initial example shows that the concept of region
is orthogonal to the layout of regions. This means that regions
can be created and positioned using existing CSS and HTML
layout (such as multi-column, flex box or grid layout).
The CSS Regions specification defines how these regions can
be the recipients of a 'named flow'.
</p>
</div>
<h1>Region with multi-column example</h1>
<div id="multi-col" class="article-content"></div>
<div id="regular-div" class="article-content"></div>
</body>
</html>