You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: css3-images/Overview.src.html
+6-4Lines changed: 6 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -287,11 +287,13 @@ <h3 id='element-reference'>
287
287
288
288
<p>The ''element()'' function allows an author to use an element in the document as an image. As the referenced element changes appearance, the image changes as well. This can be used, for example, to create live previews of the next/previous slide in a slideshow, or to reference a canvas element for a fancy generated gradient or even an animated background. The syntax for ''element()'' is:</p>
<p>where <id-selector> is an ID selector [[!SELECT]], and <identifier> is an identifer [[!CSS3VAL]].</p>
292
+
<p>where <id-selector> is an ID selector [[!SELECT]].</p>
293
293
294
-
<p>If the argument to the ''element()'' function is an ID selector, the function references the element matched by the selector. If it's an identifier, the function references the element whose <dfn>CSS element reference identifier</dfn> is the given identifier. (CSS does not define how an element acquires a <i>CSS element reference identifier</i>; that is determined by the host language.)</p>
294
+
<p>If the argument to the ''element()'' function is an ID selector, the function references the element matched by the selector.</p>
295
+
296
+
<p>HTML defines an additional way for an element to match this ID selector, via the <ahref='http://www.whatwg.org/specs/web-apps/current-work/multipage/dom.html#dom-document-csselementmap'><code>CSSElementMap</code></a>. If an element matching the ID selector is not found in the document, the ID is then looked up in the <code>CSSElementMap</code>. Other host languages may define additional ways for elements to match the argument in ''element()''.</p>
295
297
296
298
<divclass='example'>
297
299
<p>The ''element()'' function can be put to many uses. For example, it can be used to show a preview of the previous or next slide in a slideshow:</p>
@@ -455,7 +457,7 @@ <h4 id='paint-sources'>
455
457
<dt>userSpaceOnUse</dt>
456
458
<dd>The coordinate system has its origin at the top left corner of the painting area. Units in the coordinate space are sized equivalently to the CSS ''px'' unit.</dd>
0 commit comments