锘??xml version="1.0" encoding="utf-8" standalone="yes"?>午夜精品久久久久久99热,九九精品在线视频,99视频这里有精品http://www.aygfsteel.com/SunRiver/category/44307.htmlTopics about Java SE, Servlet/JSP, JDBC, MultiThread, UML, Design Pattern, CSS, JavaScript, Maven, JBoss, Tomcat, ...zh-cnTue, 16 Mar 2010 02:30:15 GMTTue, 16 Mar 2010 02:30:15 GMT60Difference between class and id in CSShttp://www.aygfsteel.com/SunRiver/archive/2010/03/16/315552.htmlSun RiverSun RiverTue, 16 Mar 2010 02:14:00 GMThttp://www.aygfsteel.com/SunRiver/archive/2010/03/16/315552.html---The key thing to know is that IDs identify a specific element and therefore must be unique on the page – you can only use a specific ID once per document. Many browsers do not enforce this rule but it is a basic rule of HTML/XHTML and should be observed. Classes mark elements as members of a group and can be used multiple times, so if you want to define a style which will be applied to multiple elements you should use a class instead.

 Notice that an ID's CSS is an HTML element, followed by a "#", and finally ID's name. The end result looks something like "element#idname". Also, be sure to absorb the fact that when an ID is used in HTML, we must use "id=name" instead of "class=name" to reference it!

Why Did They Choose Those Names??

       ID = A person's Identification (ID) is unique to one person.

       Class = There are many people in a class.

ID for Layout and Uniqueness

Standards specify that any given ID name can only be referenced once within a page or document. From our experience, IDs are most commonly used correctly in CSS layouts. This makes sense because there are usually only one menu per page, one banner, and usually only one content pane.

In Tizag.com CSS Layout Examples we have used IDs for the unique items mentioned above. View the CSS Code for our first layout example. Below are the unique IDs in our code.

*       Menu - div#menuPane

*       Content - div#content

Answer: Classes vs IDs

Use IDs when there is only one occurence per page. Use classes when there are one or more occurences per page.



Sun River 2010-03-16 10:14 鍙戣〃璇勮
]]>
主站蜘蛛池模板: 潜山县| 常熟市| 大渡口区| 武冈市| 南昌市| 洛阳市| 达州市| 丘北县| 中牟县| 荔波县| 托里县| 获嘉县| 霍林郭勒市| 德令哈市| 中牟县| 睢宁县| 隆昌县| 绥宁县| 色达县| 英吉沙县| 拉萨市| 汝南县| 黄石市| 兴隆县| 凌源市| 临沂市| 富民县| 大名县| 凤庆县| 扎赉特旗| 巴里| 丰台区| 荃湾区| 吴江市| 彭阳县| 宿州市| 舒城县| 益阳市| 深泽县| 台前县| 黑水县|