-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathbackground.html
More file actions
53 lines (51 loc) · 1.44 KB
/
background.html
File metadata and controls
53 lines (51 loc) · 1.44 KB
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Model: Background color test</title>
<link rel="stylesheet" href="style.css" />
<style>
model {
background-color: blue;
}
pre {
background-color: rgb(213, 213, 213);
display: inline-block;
padding: 10px;
}
</style>
</head>
<body>
<div class="container">
<h1>Model: Background color test</h1>
<hr />
<p>
Set the background with CSS. Note that because the model exists in a
plane conceptually <em>behind</em> the page, it is not recommended to
support a transparent background.
</p>
<h2>HTML</h2>
<pre>
<model alt="A model of a teapot">
<source src="./teapot.usdz" type="model/vnd.usdz+zip" />
<source src="./teapot.glb" type="model/gltf-binary" />
</model></pre
>
<h2>CSS</h2>
<pre>
model {
background-color: blue;
}</pre
>
<model alt="A model of a teapot">
<source src="./teapot.usdz" type="model/vnd.usdz+zip" />
<source src="./teapot.glb" type="model/gltf-binary" />
<img
src="./teapot-fallback-blue.jpg"
alt="An image of a model of a teapot on a blue background" />
</model>
</div>
</body>
</html>