Working with Special Effects Creating Rollovers, Menus, Filters, and Transitions.

Slides:



Advertisements
Similar presentations
HTML Basics Customizing your site using the basics of HTML.
Advertisements

CSS Cascading Style Sheets. Objectives Using Inline Styles Working with Selectors Using Embedded Styles Using an External Style Sheet Applying a Style.
Ideas to Layout Beginning web layout using Cascading Style Sheets (CSS). Basic ideas, practices, tools and resources for designing a tableless web site.
1 Cascading Style Sheets Continued Different kinds of selectors in a style sheet –Simple- Pseudo-Class –Contextual- Pseudo-Element –Class Image Styles.
Cascading Style Sheets
Introducing CSS CIS 133 mashup Javascript, jQuery and XML 1.
Chapter 3 – Designing your web pages Dr. Stephanos Mavromoustakos.
Project 8 Creating Style Sheets.
Cascading Style Sheets. CSS stands for Cascading Style Sheets and is a simple styling language which allows attaching style to HTML elements. CSS is a.
CSS Menus and Rollovers. Agenda foil Separating style from content 3 pages in one file Rollovers in CSS Horizontal drop-downs Vertical drop-downs.
1 Web Developer & Design Foundations with XHTML Chapter 9 Key Concepts.
CSS BASICS. CSS Rules Components of a CSS Rule  Selector: Part of the rule that targets an element to be styled  Declaration: Two or more parts: a.
1 Pengantar Teknologi Internet W03: CSS Cascading Style Sheets.
กระบวนวิชา CSS. What is CSS? CSS stands for Cascading Style Sheets Styles define how to display HTML elements Styles were added to HTML 4.0 to.
Web Design with Cascading Style Sheet Lan Vu. Overview Introduction to CSS Designing CSS Using Visual Studio to create CSS Using template for web design.
The Web Warrior Guide to Web Design Technologies
Chapter 6 Photoshop and ImageReady: Part II The Web Warrior Guide to Web Design Technologies.
Intermediate Level Course. Text Format The text styles, bold, italics, underlining, superscript and subscript, can be easily added to selected text. Text.
Create slices and hotspots Create links in Web pages Create rollovers from slices Create basic animation Add tweening symbol instances to create animation.
XP 1 Working with Cascading Style Sheets Creating a Style for Online Scrapbooks Tutorial 7.
Macromedia Dreamweaver 4 Advanced Level Course. Add Rollovers Rollovers or mouseovers are possibly the most popular effects used in designing Web pages.
1 By: Nathan Mittler For CSCI 344 Spring INTRODUCTION DHTML builds on to the capabilities of HTML Currently supported by Microsoft Internet Explorer.
JavaScript 101 Lesson 5: Introduction to Events. Lesson Topics Event driven programming Events and event handlers The onClick event handler for hyperlinks.
Tutorial 13 Working with Objects and Styles. XP Objectives Learn about objects and the document object model Reference documents objects by ID, name,
Working with Cascading Style Sheets. 2 Objectives Introducing Cascading Style Sheets Using Inline Styles Using Embedded Styles Using an External Style.
Developing a Basic Web Page with HTML
 Using Microsoft Expression Web you can: › Create Web pages and Web sites › Set what you site will look like as you design it › Add text, images, multimedia.
Working with Cascading Style Sheets. Introducing Cascading Style Sheets Style sheets are files or forms that describe the layout and appearance of a document.
Chapter 11 Cascading Style Sheets: Part I The Web Warrior Guide to Web Design Technologies.
XP Tutorial 7New Perspectives on Creating Web Pages with HTML, XHTML, and XML 1 Working with Cascading Style Sheets Creating a Style for Online Scrapbooks.
© Cheltenham Computer Training 2001 Macromedia Dreamweaver 4 - Slide No 1 Macromedia Dreamweaver 4 Advanced Level Course.
4 HTML Basics Section 4.1 Format HTML tags Identify HTML guidelines Section 4.2 Organize Web site files and folder Use a text editor Use HTML tags and.
CSS Positioning Creating Special Effects with CSS CS202 Working with Cascading Style Sheets (Chapter 4) CS202 1.
Cascading Style Sheets. Defines the presentation of one or more web pages Similar to a template Can control the appearance of an entire web site giving.
Adding User Interactivity – Lesson 51 Adding User Interactivity Lesson 5.
Section 4.1 Format HTML tags Identify HTML guidelines Section 4.2 Organize Web site files and folder Use a text editor Use HTML tags and attributes Create.
XP Mohammad Moizuddin Creating Web Pages with HTML Tutorial 1 1 New Perspectives on Creating Web Pages With HTML Tutorial 1: Developing a Basic Web Page.
 This presentation introduces the following: › 3 types of CSS › CSS syntax › CSS comments › CSS and color › The box model.
Creating an Animated Web Page
Working with Objects Creating a Dynamic Web Page.
CITS1231 Web Technologies JavaScript and Document Object Model.
XP Tutorial 4 New Perspectives on JavaScript, Comprehensive1 Working with Objects Creating an Animated Web Page.
Tutorial 5 Formatting with CSS. Objectives Session 5.1 – Evaluate why CSS styles are used – Determine where to write styles – Create an element selector.
Introduction to Programming the WWW I CMSC Winter 2003 Lecture 7.
XP Tutorial 12 New Perspectives on HTML, XHTML, and DHTML, Comprehensive 1 Working with Special Effects Creating Rollovers, Menus, Filters, and Transitions.
XP Tutorial 7New Perspectives on HTML and XHTML, Comprehensive 1 Working with Cascading Style Sheets Tutorial 7.
 2001 Deitel & Associates, Inc. All rights reserved. 1 Chapter 20 – Dynamic HTML: Object Model and Collections Outline 20.1Introduction 20.2Object Referencing.
Use CSS to Implement a Reusable Design Selecting a Dreamweaver CSS Starter Layout is the easiest way to create a page with a CSS layout You can access.
HTML GUIDE Press F5 and then Click on the links on the left to get to the section you want Section 1: Getting Started Section 2: Moving Banner Section.
4 HTML Basics Section 4.1 Format HTML tags Identify HTML guidelines Section 4.2 Organize Web site files and folder Use a text editor Use HTML tags and.
Cascading Style Sheets CSS. Source W3Schools
XP Review 2 New Perspectives on JavaScript, Comprehensive1 Introducing Cascading Style Sheets Formatting Web Pages with CSS.
DYNAMIC HTML What is Dynamic HTML: HTML code that allow you to change/ specify the style of your web pages. Example: specify style sheet, object model.
CNIT 132 – Week 4 Cascading Style Sheets. Introducing Cascading Style Sheets Style sheets are files or forms that describe the layout and appearance of.
CSS Cascading Style Sheets A very brief introduction CSS, Cascading Style Sheets1.
CSS Hadas Kahsay. Overview  What is CSS  Basic syntax of CSS Rules  How to link CSS style to html documents  Browsers and CSS  Advantages of CSS.
XP Tutorial 5 New Perspectives on JavaScript, Comprehensive1 Working with Special Effects Creating Rollovers, Menus, Filters, and Transitions.
Positioning Objects with CSS and Tables
Project 7: Exploring DHTML Essentials for Design JavaScript Level Two Michael Brooks.
Chapter 10 Dynamic HTML (DHTML) JavaScript, Third Edition.
NASRULLAHIBA.  It is time to take your web designing skills to the next level with Cascading Style Sheets (CSS). They are a way to control the look and.
Microsoft Expression Web - Illustrated Unit A: Getting Started With Microsoft Expression Web.
XP Tutorial 7New Perspectives on HTML and XHTML, Comprehensive 1 Working with Cascading Style Sheets Creating a Style for Online Scrapbooks Tutorial 7.
Working with Cascading Style Sheets
Section 4.1 Section 4.2 Format HTML tags Identify HTML guidelines
Formatting Text with CSS
Web Systems & Technologies
Working with Special Effects
Cascading Style Sheets™ (CSS)
Tutorial 3 Working with Cascading Style Sheets
Presentation transcript:

Working with Special Effects Creating Rollovers, Menus, Filters, and Transitions

2 Objectives Understand how to work with the JavaScript document.images collection Create image objects and image object arrays Set the properties of image objects Create image rollovers with image objects and the document.images collection Understand how to create text rollovers Understand how to work with pop-up and pull-down menus Hide and unhide objects in a Web page Understand and implement Internet Explorer’s filter styles Understand and apply Internet Explorer’s transition styles

3 Working with Image Objects

4 Referencing an Inline Image –Each inline image is part of an array of images in the document called the image collection document.images[idref] document.images.idref –Other forms document.getElementBy(“id”) document.name

5 Working with Image Objects Referencing an Inline Image

6 Working with Image Objects Creating an Image object –JavaScript treats all inline images as objects known as image objects –To create a new image object image = new Image(width, height);

7 Working with Image Objects Properties of Image Objects

8 Working with Image Objects Detecting Image Objects –It is possible that your users will be running a very early browser version –Can use object detection to determine each user’s level of browser support

9 Creating an Image Rollover An image rollover is created when you change the source of an inline image from one graphic file to another

10 Creating an Image Rollover Preloading the Images –Performance is an important consideration when creating a rollover effect –Can preload all of the image objects a user may need, storing the images in the browser’s memory –It is often more efficient to store your image objects in arrays

11 Creating an Image Rollover Preloading the Images –Example

12 Creating an Image Rollover Swapping Image Objects –Once the images are preloaded, you can use JavaScript to swap the source for one image with the source for another

13 Creating an Image Rollover Running the Image Rollover

14 Creating a Text Rollover Using the Hover Pseudo-Class a:hover {styles} –Example a:hover {color: red; font-weight:bold} General Text Rollovers –Modify the style properties of an element in response to the rollover event

15 Working with Menus

16 Working with Menus Creating a Pop-Up Menu –In a pop-up menu, a user clicks an object on the page and the menu appears, sometimes elsewhere on the page

17 Working with Menus Creating a Pull-Down Menu –In a pull-down menu, part of the menu is visible –When a user clicks the visible part, the rest of the menu is revealed

18 Creating Pop-Up Menu Functions

19 Creating Pop-Up Menu Functions Displaying Menu Contents

20 Creating Pop-Up Menu Functions Calling the Menu Functions

21 Creating Pop-Up Menu Functions Calling the Menu Functions

22 Working with Internet Explorer Filters A filter is an effect that is applied to an object or page to change its appearance Is applied by adding a filter style to the Web page’s style sheet or by running a JavaScript command that applies a filter to an object

23 Working with Internet Explorer Filters Applying Filters by Using Styles –In version 4.0 filter: filter_name(params) –In versions 5.5 and above filter: progid:DXImageTransorm.Microsoft.filter_name(params)

24 Working with Internet Explorer Filters

25 Working with Internet Explorer Filters Applying Filters by Using Styles

26 Working with Internet Explorer Filters Applying Filters by Using Styles

27 Working with Internet Explorer Filters Running Filters with JavaScript object.style.filter = “filter text”; –Internet Explorer’s version of JavaScript also recognizes the filter collection object.filters[idref] object.filters[“name”] –You can reference specific parameters within each filter using filter.param

28 Working with Internet Explorer Filters Adding a Filter Effect to the Plays Page

29 Working with Internet Explorer Filters Using a Light Filter –In 4.0 filter: Light() –In 5.5 or better Filter: progid:DKImageTransform.Microsoft.Light() –To add ambient light object.filters.Light.addAmbient(red, green, blue, strength)

30 Working with Internet Explorer Filters Using a Light Filter –To add a point light source object.filters.Light.addPoint(x, y, z, red, green, blue, strength) –To add a light source that shines at an angle object.filters.Light.addCone(x, y, z, x2, y2, red, green, blue, strength, spread) –To move the light source to another location object.filters.Light.moveLight(light, x, y, z, absolute)

31 Working with Internet Explorer Filters Using a Light Filter –To change the color of the light object.filters.Light.changeColor(light, red, green, blue, absolute) –To change the intensity of the light source object.filters.Light.changeStrength(light, strength, absolute) –To remove all of the light sources object.filters.Light.clear()

32 Working with Transitions A transition is a visual effect that is applied to an object over an interval of time Applying Transition Styles –A blend transition is a transition in which one object is blended into another filter: blendTrans(duration = value) –A reveal transition is a more general transition in which a visual effect is applied as one object is changed into another filter: revealTrans(duration = value)

33 Working with Transitions Applying Transition Styles

34 Working with Transitions

35 Working with Transitions Applying Transition Styles

36 Working with Transitions Scripting Transitions –Code for scripting a transition follows the same syntax used for filters

37 Working with Transitions Running a Transition –Involves four steps Setting the initial state of the object Applying a transition to the object Specifying the final state of the object Playing the transition

38 Working with Transitions Adding a Transition to the Plays Page

39 Working with Transitions Adding a Transition to the Plays Page

40 Working with Transitions Using Interpage Transitions –Interpage transitions involve effects applied to a page when a browser either enters or exits the page

41 Tips for working with Special Effects Preload all images used in image rollovers to speed up the rollover effect Place rollover images in image arrays to make it easier to write programs that swap the images Place long lists of links into pop-up or pull- down menus to save screen space

42 Tips for working with Special Effects Place filter styles in separate style declarations to avoid problems with older browsers If you use filter or transition styles, test your Web site on non-Internet Explorer browsers to ensure that their use does not cause problems for those browsers