« Home « Chủ đề CSS căn bản

Chủ đề : CSS căn bản


Có 80+ tài liệu thuộc chủ đề "CSS căn bản"

Developing Large Web Applications- P9

tailieu.vn

<div id="nwcpop". class="default">. <div class="hd">. <div class="tagline">. </div>. <div class="logo">. <img src="http://.../logo_honda.gif"/>. <div class="bd">. <ul class="pri">. <a href="http gt;2009 Honda Accord</a>. <a href="http gt;2009 Honda Civic</a>. <a href="http gt;2009 Honda Civic Hybrid</a>. <ul class="sec">. <a href="http gt;2009 Honda Civic Sedan</a>. <a href="http gt;2009 Honda CR-V</a>. <a href="http gt;2009 Honda Element</a>. Presentation switching for the Popular New Cars module. Apply this...

Developing Large Web Applications- P10

tailieu.vn

Compared with absolute positioning for arranging block-level elements side by side, floating has the benefit of not requiring you to know which of the elements is the tallest.. Alternatively, you can set over flow to hidden and zoom to 1 for the parent of the floated elements. Layouts and Containers. These are some of the most common layouts in large...

Developing Large Web Applications- P11

tailieu.vn

#con2x1.default. #con2x1.minimum. Example 4-23 shows how you could use the default version of the 2x1 container within the primary content section of the Results layout presented earlier. The default version of the 2x1 container within the Results layout. <div id="layres">. <div class="layreshdr">. </div>. <div class="layresmaj">. <div class="layrespri">. <div id="con2x1". class="default">. <div class="con2x1pri">. <div class="con2x1sec">. <div class="layressec">. <div class="layrester">. <div class="layresftr1">....

Developing Large Web Applications- P12

tailieu.vn

You can see examples of this in the YUI library, which we’ll present later. When you call YAHOO.util.Dom.getStyle , for example, you’re calling a method that is actually a mem- ber of the Dom object, which is a member of the util object, which, in turn, is a member of the YAHOO object. Whenever you do this, you need to...

Developing Large Web Applications- P13

tailieu.vn

if (this.slider). this.lb = YAHOO.util.Dom.getElementsByClassName. "btnl img", this.slider. this.lb = (this.lb &&. this.lb.length >. this.lb[0. YAHOO.util.Event.addListener. this.lb, "click", this.slideL, this, true. to everything encapsulated in the object using the this pointer.. alert(this.state1);. alert(this.state2);. For example, in the case of a location change, you would likely want a handler to know what the location was changed to, and possibly what the...

Developing Large Web Applications- P14

tailieu.vn

this.disabled = false;. MVC.MultiSelectView.prototype.attach = function(m, i). If the view has no predecessor view, it must be first in the chain.. if (!this.prev). this.model.firstModel = true;. this.container = document.getElementById(this.id);. MVC.MultiSelectView.prototype.update = function(). Called when a change in the model takes place. var select = this.getSelect();. select.setAttribute("name", this.name);. this.changeHandler, this,. if (this.container). this.container.appendChild(select);. if (this.disabled) select.disabled = true;. Start the options...

Developing Large Web Applications- P15

tailieu.vn

Defining get_data. The get_data method of a data manager abstracts the process of getting data from the backend. public function get_data($load_args, &$load_data, &$load_stat). Input arguments needed for getting the data—for example, configuration settings, a database connection, or the maximum number of items in a list of data to retrieve.. The set_data method of a data manager abstracts the process of...

Developing Large Web Applications- P16

tailieu.vn

Data often is returned as XML, but JSON (see “Data in the JSON For- mat” on page 132) is very popular as well. To access a web service from a data manager, you can use the PHP Client URL (cURL) library. Set the URL to the web service required by the data manager.. Do whatever processing is needed to the...

Developing Large Web Applications- P17

tailieu.vn

For exam- ple, all pages fundamentally need a way to save and load data, define content, and assemble the page’s components, among other things.. Public Interface for the Page Class. For example, the public interface for Page provides methods for assembling a page as well as managing the CSS and JavaScript for the page overall.. The methods for working with...

Developing Large Web Applications- P18

tailieu.vn

$this->body = <<<EOD. return $this->body;. public function get_page(). id this->css_id . $doctype = $this->get_doctype();. $meta = $this->get_meta();. $title = $this->get_title();. $js_top = $this->get_all_js();. $js_btm = $this->get_all_js();. $css = $this->get_all_css();. $this->body. public function get_doctype(). public function get_meta(). content="{$this->equiv}". content="{$this->desc}". content="{$this->keywd}". public function get_title(). <title>{$this->title}</title>. public function add_to_css_linked($keys). $this->css_linked. $this->manage_css_linked($keys);. public function add_to_css($css). $this->css. public function get_all_css(). $this->css_module = $this->css_linked;. $this->css_module. $this->create_css($this->css);....

Developing Large Web Applications- P19

tailieu.vn

$this->css_is_local = false;. $this->js_linked_info = array. $this->js_is_local = false;. A sectional page class is a class derived from your sitewide page class that customizes the sitewide page class for a section of your application (e.g., NewCarsPage for a section of the site containing multiple pages related to new cars). It does this by implementing its own register_links method, which calls...

Developing Large Web Applications- P20

tailieu.vn

with text for the caption and the attribution.. if (!empty($this->picture["attr". courtesy of {$this->picture["attr"]}. if (empty($this->picture["img_l". <img src="{$this->picture["img_l"]}". alt="{$this->picture["text . class="{$this->type}">. {$this->picture["text"]}. Example 7-7 presents the JavaScript that implements behaviors for the Picture Slider module. The JavaScript for the module needs two YUI libraries (which you can download from http://developer .yahoo.com/yui) to support it. PictureSlider JavaScript object for the slideshow PictureSlider...

Developing Large Web Applications- P21

tailieu.vn

$this->class = "compact";. $this->class = "midsize";. class="$this->class">. In large web applications, multiple instances of the same module often need to appear on the same page. Example 7-12 presents one solution using the method set_instance that lets you supply a unique identifier by which to identify each instance of the module. The module appends this unique ID to a base ID...

Developing Large Web Applications- P22

tailieu.vn

The following method executes an Ajax POST request with jQuery. The parame- ters for the method are the same as described for GET except you set the type member to POST. jQuery.ajax. Prototype is one of the earliest of the JavaScript libraries to support Ajax. You can download the library and read its complete documentation at http://www.prototypejs .org:. The following...

Developing Large Web Applications- P23

tailieu.vn

The only difference is that changes to the model happen as a result of local data changes rather than from making an Ajax connection.. For simplicity, the model manages a single piece of data: a timestamp that can be set via the server using an Ajax request or locally within the browser. Whenever the time is updated (either from the...

Developing Large Web Applications- P24

tailieu.vn

Terminates an Ajax request that is already in progress using this Connect object.. You can pass either MVC.Connect.Ignore or MVC.Connect.Change for value . With MVC.Connect.Ignore , new Ajax requests using the same Connect object are simply discarded while a connection is in progress. With MVC.Connect.Change , a new re- quest replaces the one in progress.. Abstract Interface for the Connect...

Developing Large Web Applications- P25

tailieu.vn

Ultimately, none of the techniques presented in this book would be practical if they didn’t provide a solid foundation on which to build large web applications that perform quickly and efficiently. Likewise, modular techniques for large-scale PHP (see Chapter 7) generally create a faster site than jumping in and out of the PHP interpreter multiple times whenever needed.. To guide...

Developing Large Web Applications- P26

tailieu.vn

Just as you can cache the contents of individual modules that you don’t expect to change frequently, you also can cache the contents of entire pages. You create a CacheablePage class and over- ride the default implementations for the create and get_page methods. At this point, you can inspect parameters for generating the page even before taking the time to...

Developing Large Web Applications- P27

tailieu.vn

For example, for the CSS file newcars_20090731.css (containing the CSS for one section of the application), you can create a sprite file called newcars_20090731.jpg that contains all the JPEG images for just that section.. Although not directly related to performance from the standpoint of how fast a page loads, the ability to capture metrics about how visitors are using your...

Developing Large Web Applications- P28

tailieu.vn

By placing them in a directory called common, or something similar, at the top of the directory structure, you convey their sitewide scope. .../common/page.inc .../common/sitepage.inc .../common/module.inc. Example 10-1 shows NavBar derived from the Module base class, which requires module.inc.. We’re not going to examine the details of many of the classes in this chapter. Example 10-1. require_once(".../common/module.inc");. You need to...