Xem mẫu
Chapter 6: Frames
Try It Out A Frame-Based Play Viewer
We don’t have a need for frames on our café site, so in this Try It Out you’re going to create a frame-based viewer for finding the different acts of Shakespeare’s A Comedy of Errors.
The idea behind the viewer is that you have one long page that contains the entire play, and then there is a frame on the right that allows you to navigate between the scenes of the play.
Before you start to build the example, it would help to have a look at what you are going to create. You can see the page in Figure 6-8.
Figure 6-8
Three files actually make up this example:
viewer.html, which contains the frameset for play and navigation navigation.html, which is the right-hand frame comedyoferrors.html, which is the page with the play
232
Chapter 6: Frames
You will work through these pages in this order:
1. Start your text editor or web page editor and create a skeleton of a frameset document, remembering that this will be slightly different from the documents you have been creating so far. The following code is for viewer.html:
?xml version=”1.0” encoding=”iso-8859-1”?>
A Comedy of Errors
2. Divide the page up into two frames. The one on the right is fixed at 200 pixels wide, while the one on the left takes up the remaining part of the screen.
As you can see, this requires the use of a
nguon tai.lieu . vn