-
Notifications
You must be signed in to change notification settings - Fork 708
/
Copy pathmulti-column-region-2.html
120 lines (106 loc) · 2.95 KB
/
multi-column-region-2.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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
<html>
<head>
<style>
body{
font-family:"Georgia", serif;
width: 50ex;
margin-left: auto;
margin-right: auto;
}
#flex {
height: 4em;
border: 1px solid red;
display: -webkit-box;
-webkit-box-pack: justify;
}
#flex .col {
border: 1px solid lime;
-webkit-flow-from: article;
width: 48%;
}
#flex .col:last-child {
margin-right: 0%;
}
#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;
}
#reference-multi-col {
-webkit-column-count: 4;
height: 2em;
border: 1px solid #a0a0a0;
position:absolute;
top: 0;
left: 0;
}
</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>
<div id="reference-multi-col">
This illustrates some of
</div>
<h1>Region with multi-column example</h1>
<div id="flex" class="article-content">
<div class="col"></div>
<div class="col"></div>
</div>
<div id="regular-div" class="article-content"></div>
</body>
</html>