HTML and CSS Reference
In-Depth Information
In the end, you just add one line to run when the application has been newly launched. The line
just registers a handler for any click event raised by the specified button.
You can give the final touch to the application with a second pass on CSS to adjust the rendering
of the label and button. Add the following to the default.css file:
#numberButton {
font-size: x-large;
#numberLabel {
font-size: xx-large;
color: #eeee00;
font-weight: bold;
The leading pound (#) symbol indicates that the style applies to any HTML element whose ID
matches the name—for example, the style defined as #numberButton applies to all elements with an
ID of numberButton . Figure 1-19 shows the modified application in action.
FIGURE 1-19 A Windows 8 application to get random numbers.
Although this is still a fairly simple application, it should be enough to get you started and to give
you the overall feeling of how you approach Windows 8 programming with HTML5 and JavaScript.
You'll start building more sophisticated applications in Chapter 5, “First steps with Windows 8
Search WWH ::

Custom Search