<tablesummary="This is a chart of year-end returns for 2005."><thead><tr><th scope="col">Tableheader1</th><th scope="col">Tableheader2</th></tr></thead>
<tbody>
<tr>
<td>Table data 1</td>
<td>Table data 2</td>
</tr>
</tbody>
</table>
ID 选择器比属性选择器明确度高,class 选择器比任何数量的元素选择器明确度高。尽量使用 ID 选择器来提高明确度。有时候我们可能会想方设法给一个元素应用一条CSS规则,但用尽方法也不能如愿。这种情况有可能是因为我们使用的选择器比另外一个的明确度低,所以明确度高的另一个选择器里的属性就比我们想应用的选择器优先了。这种情况在更大或更复杂的样式表里更为常见。在小一些的项目里,通常这不是大问题。
/* Equivalent to 13px font-size and 20px line-height, but only if the browser default text size is 16px. */#selector {font-size: 0.813em;
line-height: 1.25em;
}
<scriptsrc="cufon-yui.js"type="text/javascript"></script><scriptsrc="YourFont.font.js"type="text/javascript"></script><scripttype="text/javascript">Cufon.replace('h1'); // Works without a selector engineCufon.replace('#sub1'); // Requires a selector engine for IE 6-7</script>
我们推荐慎重使用 Cufon ,因为如果应用到大量的文本上,它会产生很多开销。访问 Cufon Wiki 可以获取更多相关信息。
/* PLUGIN DIRECTORY本文件中出现的插件 [按出场顺序排序] 1.) Animate Background Position - http://plugins.jquery.com/project/backgroundPosition-Effect2.) jQuery Easing Plugin - http://gsgd.co.uk/sandbox/jquery/easing/3.) jQuery Ajax Form plugin - http://jquery.malsup.com/form/#download 4.) jQuery validation plugin (form validation) - http://docs.jquery.com/Plugins/Validation-password strength5.) Styled Selects (lightweight) - http://code.google.com/p/lnet/wiki/jQueryStyledSelectOverview*//*** 1.) Animate Background Position - http://plugins.jquery.com/project/backgroundPosition-Effect* @author Alexander Farkas* v. 1.21*/(function($) {if(!document.defaultView ||!document.defaultView.getComputedStyle){ // IE6-IE8//SNIPPED};})(jQuery); /*** 2.) jQuery Easing Plugin (we're not using jQuery UI as of yet) - http://gsgd.co.uk/sandbox/jquery/easing/*/// t: currenttime, b: begInnIng value, c: change Invalue, d: durationjQuery.easing['jswing'] = jQuery.easing['swing']; jQuery.extend( jQuery.easing,{//SNIPPED });;(function($) {$.fn.ajaxSubmit =function(options) {
//SNIPPED
}
})(jQuery);
/* * jQuery Styled Select Boxes * version: 1.1 (2009/03/24) * @requires jQuery v1.2.6 or later * * Examples and documentation at: http://code.google.com/p/lnet/wiki/jQueryStyledSelectOverview * * Copyright (c) 2008 Lasar Liepins, liepins.org, liepins@gmail.com * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. * */
jQuery.fn.styledSelect =function(settings) {
//SNIPPED
return this;
};
http头部的 Expires 必须设为据现在一个月到一年(远期)之间的值。缓存只适用于那个指定的URL,所以文件名或任何资源的改变都会产生一个新的拷贝。很多开发者使用build过程来给它们的资源增加一个版本号或时间戳。每个随后的build会开始一个全新的缓存版本,让你在使用远期缓存日期时无需担心。 Google 的这篇文章里有更多关于浏览器缓存的细节信息。
A great code editor can spark productivity in exceptional ways. Many developers prefer rudimentary text editors, others prefer powerful integraded development environments (IDEs). What follows is a general listing of some of the more well-known tools, it would be impossible to list them all.
Aptana
Aptana Studio is a powerful, free and open source Ajax development environment which runs stand-alone or within Eclipse. Aptana Studio offers tooling for Ajax including HTML, CSS, DOM, and JavaScript editing and debugging, plus support via additional free plugins for PHP, Ruby on Rails, Adobe AIR, Apple iPhone development. It also features full SVN repository integration for committing, branching, tagging, merging and repository browsing. Aptana. [Linux, Mac, Windows]
Geany
Geany is a text editor using the GTK2 toolkit with basic features of an integrated development environment. It was developed to provide a small and fast IDE, which has only a few dependencies from other packages. It supports many filetypes and has some nice features. Geany. [Linux, Mac, Windows]
Notepad ++
Notepad++ is a free (free as in “free speech”, but also as in “free beer”) source code editor and Notepad replacement, which supports several programming languages, running under the MS Windows environment. Notepad ++. [Windows]
e TextEditor
E is a new text editor for Windows, with powerful editing features and quite a few unique abilities. It makes manipulating text fast and easy, and lets you focus on your writing by automating all the manual work. You can extend it in any language, and by supporting TextMate bundles, it allows you to tap into a huge and active community. e TextEditor. [Windows]
Edit Plus
EditPlus is a text editor, HTML editor and programmers editor for Windows. While it can serve as a good Notepad replacement, it also offers many powerful features for Web page authors and programmers. EditPlus. [Windows]
Homesite
HomeSite 5.5 provides a lean, code-only editor for web development. Advanced coding features enable you to instantly create and modify HTML, CFML, JSP, and XHTML tags, while enhanced productivity tools allow you to validate, reuse, navigate, and format code more easily. Configure Adobe (formerly Macromedia) HomeSite to fit your needs by extending its functionality and customizing the interface. Homesite. [Windows]
TextMate
TextMate claims to be the “Missing Editor” for Mac OS X. A general purpose editor with a sparse interface, the real power is in it’s extensibility. Features column selections, recordable macros, snippets, auto-pairing of brackets and other characters, clipboard history, code folding, tab-triggers, tabbed placeholders and mirror typing. And that’s just for starters. Anything that can be done via scripts through the Mac command line can be done through custom commands, allowing an extremely high degree of customization and expansion of the feature set. TextMate’s “bundle” format has been adapted by many other code editors including the aforementioned e TextEditor. TextMate. [Mac]
Espresso
Espresso was created by the same fellow that created the innovative CSSEdit CSS editor. Espresso features syntax highlighting, code folding, code completion, document outliner/navigators, projects, powerful find features, and built-in file transfer publishing capabilities. Finally, it has a powerful “Sugar” feature set which allows the creation of custom commands and plugins. Espresso. [Mac]
BBEdit
BBEdit is the grand-daddy of Mac code editors for web development. Features syntax highlighting, exceptionally powerful text manipulation tools, multi-file searches, a scriptable API, text clippings, and extensive Mac Automator features. BBEdit. [Mac]
TextWrangler
The free “little brother” of BBEdit, it is a powerful raw text editor with a massive text manipulation feature set. Searches, regular expressions, text transformations, syntax highlighting and code navigation tools for a variety of different language environments. TextWrangler. [Mac]
Coda
Coda from Panic software is a powerful IDE with code editing, terminal, remote file management, and help documentation all built into one UI. Aiming to be a one stop shop for your web development workflow, it also features SVN integration and a new plug-in builder with powerful scripting support and TextMate bundle importing. Finally, code clips and live multi-user editing are also supported. Coda. [Mac]
UltraEdit
Another editor that’s been around for ages, this is an immensely robust and powerful text editor, able to open files limited only by the amount of memory on your computer. The feature list is virtually too much to list, with a massive list of text manipulation features, project support, powerful search and replace, hex editing, function lists, a massive list of languages supported (600+) remote file ftp, telnet, ssh, file comparison, scriptable macros, tools and compiler support, and much, much more. UltraEdit. [Linux, Mac, Windows]
Sublime Text
A relatively new editor, Sublime Text is a new approach in editors. “Open Anything” searches through file names and file contents, with remarkable efficiency. Incredibly powerful selection controls allow editing text in multiple locations at once and the “Minimap” gives you a bird’s eye view of the open file so you can find your place easily. Actively being developed, new features are being added and the community around the editor is rapidly expanding. Macros, auto-complete, snippets, build tools, the list of features goes on and on. Supports Linux and Mac starting with version 2. Sublime Text. [Linux, Mac, Windows]
Vim
If you have to ask, it’s probably not for you. Vim [Linux, Mac, Windows]
Not actually an extension for Chrome, but built right in (shares much with Safari’s Web Inspector, both being derived from WebKit.) This suite of tools features a DOM inspector, basic JavaScript debugger, profiling tools, network loading inspector and timelines, page resources inspectors, and more. Developer Tools.
code cola
A pop-up panel with CSS editing tools for examining and modifying the styles on a given page. code cola.
Firebug Lite for Google Chrome
You really don’t need to install an extension to use Firebug Lite with Chrome, though the extension is nice because it enables one-click application of the Firebug Lite script to any page you are working with. Not the full Firebug feature set, but close. Firebug Lite.
HTML5 Outliner
The HTML5 Outliner adds a pop-up with a generated HTML5 outline of the current page’s header hierarchy. Helps for checking your pages’ organization against the new HTML5 header outlining algorithms. HTML5 Outliner.
Chris Pederick, the original developer of the original Web Developer toolbar for Firefox has ported the majority of it over to Chrome. There you have it. Web Developer.
FireFTP is a free, secure, cross-platform FTP client for Mozilla Firefox which provides easy and intuitive access to FTP servers. FireFTP.
Firebug
Firebug integrates with Firefox to put a wealth of development tools at your fingertips while you browse. You can edit, debug, and monitor CSS, HTML, and JavaScript live in any web page. Firebug.
Firequery
FireQuery is a collection of Firebug enhancements for jQuery integrated into Firebug. Firequery.
Firecookie
Firecookie adds cookie viewing, editing, and deletion to Firebug. Firecookie.
CSS Usage
CSS Coverage is an extension for Firebug which allows you to scan multiple pages of your site to see which CSS rules are actually used in your site. CSS Usage.
Greasemonkey
Allows you to customize the way a web page displays using small bits of JavaScript. GreaseMonkey.
Adds an item in the status bar that displays all external JavaScript and CSS files loaded on a given page. Allows you to click on and view the files and things like their URLs. Great way to pull file URLs to put into Charles for remote debugging. JSView.
Live HTTP headers
When running, captures all HTTP traffic from the browser, which enables you to see what files are being requested as well as information about the requests and server responses. Live HTTP Headers.
Quick Locale Switcher
A tremendous help when doing internationalization, Quick Locale Switcher allows you to change the locale sent along in the browser’s user-agent HTTP header, telling servers to display content for you in other locales. Quick Locale Switcher.
Screengrab
Screengrab sits in the Firefox status bar, allowing you to capture and copy or save screen shots of everything from selections of a web page to the entire page, even parts displayed “below the fold.” Screengrab.
Total Validator
Enables one-click access to sending your page through a markup validator. No better way to quickly check for missing or mismatched tags! Also available as a standalone application. Total Validator.
Charles watches all requests and can tell you a lot of information about them. Also supremely useful is Map Local which lets you use a local file in place of a given URL (good for replacing a minified js with a full one).
From the site: “Fiddler is a Web Debugging Proxy which logs all HTTP(S) traffic between your computer and the Internet. Fiddler allows you to inspect traffic, set breakpoints, and “fiddle” with incoming or outgoing data. Fiddler includes a powerful event-based scripting subsystem, and can be extended using any .NET language.”
Speedlimit is a Leopard (works in snow leopard) preference pane for limiting your network bandwidth to one of a couple different speeds—768k DSL, Edge, 3G, and Dialup. Good for testing your lowest supported speeds or when you want to know how your app will function in real world speeds.