Skip to content

Commit 7886262

Browse files
author
ArthurHub
committed
update sample html
1 parent 9499c78 commit 7886262

File tree

1 file changed

+47
-33
lines changed

1 file changed

+47
-33
lines changed

Source/Demo/Samples/05.Images.htm

Lines changed: 47 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -3,86 +3,100 @@
33
<title></title>
44
<link rel="Stylesheet" href="StyleSheet" />
55
<style>
6-
td
7-
{
6+
.tag {
7+
color: rgb(128,0,0);
8+
}
9+
10+
.att {
11+
color: rgb(240,0,0);
12+
}
13+
14+
.prop {
15+
color: rgb(128,0,171);
16+
}
17+
18+
td {
819
vertical-align: middle;
920
padding: 1em;
1021
}
1122
</style>
1223
</head>
1324
<body>
14-
<h1>
15-
Images
25+
<h1>Images
1626
<img src="ImageIcon" />
1727
</h1>
1828
<blockquote>
1929
<p>
20-
Of course, there's the capability of displaying images. In this release, images
21-
lack of the expected alignment features to behave just as expected on an HTML context,
22-
but they will do just fine for inline contexts, tables and some others.</p>
23-
<h2>
24-
Inserting images
30+
HTML Renderer supports <code class="tag">img</code> tag as well as CSS <code class="prop">background-image</code> property.
31+
<br />
32+
Image data can be provided by URI, file path, base64 encoded and code interception.
33+
34+
</p>
35+
36+
<h2>Loading image
2537
</h2>
2638
<p>
27-
We all know that the <code>src</code> attribute of the <code>img</code> HTML tag
28-
can be a relative or absolute path to an image on the same or any other server.
29-
Here things are slightly different. Images can come from other sources:</p>
30-
<ul>
31-
<li><b>File Paths</b>: If you place a path to a file, the Renderer will try to load
32-
it using <code><font color="#099">Image</font>.FromFile</code></li>
33-
<li><b>Static Properties:</b> Obtains the image from a static property that returns
34-
an <code><font color="#099">Image</font></code> object</li>
35-
<li><b>Static Methods:</b> Obtains the image from a static method that takes no arguments
36-
and returns an <code><font color="#099">Image</font></code> </li>
37-
</ul>
38-
<h2>
39-
Positioning Images
40-
</h2>
39+
<h3>URI</h3>
40+
</p>
41+
<p>
42+
<h3>File path</h3>
43+
</p>
44+
<p>
45+
<h3>Base64 encoded</h3>
46+
</p>
47+
<p>
48+
<h3>Intercept</h3>
49+
</p>
50+
<h2>img tag</h2>
4151
<p>
4252
You can use Images anyway you like, apply borders margin and padding as for any
4353
other box.
54+
<div style="margin-top: 10px;">
55+
<b>Limitation</b>
56+
<br />
57+
Image <code class="att">align</code> attribute and CSS <code class="prop">float</code> property are not yet supported.
58+
</div>
4459
</p>
4560
<table border="1">
4661
<tr>
47-
<td>
48-
Just an image:
62+
<td>Just an image:
4963
</td>
5064
<td align="center">
5165
<img src="FontIcon" />
5266
</td>
5367
</tr>
5468
<tr>
55-
<td>
56-
Image with border and background:
69+
<td>Image with border and background:
5770
</td>
5871
<td align="center">
5972
<img src="FontIcon" style="border: 1px solid blue; background-color: Silver" />
6073
</td>
6174
</tr>
6275
<tr>
63-
<td>
64-
Stretched Image:
76+
<td>Stretched Image:
6577
</td>
6678
<td align="center">
6779
<img src="FontIcon" width="50" height="50" />
6880
</td>
6981
</tr>
7082
<tr>
71-
<td>
72-
Huge padding and border:
83+
<td>Huge padding and border:
7384
</td>
7485
<td>
7586
<img align="center" src="FontIcon" style="padding: 1em; border: solid 1em blue; background-color: #def" />
7687
</td>
7788
</tr>
7889
<tr>
79-
<td colspan="2" align="center" valign="middle">
80-
Image in line
90+
<td colspan="2" align="center" valign="middle">Image in line
8191
<img src="CommentIcon" />
8292
with the text
8393
</td>
8494
</tr>
8595
</table>
96+
97+
<h2>Background images
98+
</h2>
99+
86100
</blockquote>
87101
</body>
88102
</html>

0 commit comments

Comments
 (0)