Internet Explorer 9 Guide for Developers
Cascading Style Sheets, Level 3 (CSS3)Internet Explorer 9 has more support for Cascading Style Sheets (CSS) than any prior Microsoft browser. Continuing on the work that was done in Internet Explorer 8—where Internet Explorer became fully compliant with the CSS2.1 specification—Internet Explorer 9 adds support for many components of CSS3.Note It is important to remember that many CSS3 modules are still in the Working Draft or Last Call stages. Until they reach the Candidate Recommendation stage, they could change significantly. For more information, see the latest CSS3 draft modules .CSS3 2D TransformsInternet Explorer 9 adds support for CSS3 2D Transforms . CSS 2D Transforms enables elements that are rendered by CSS to be transformed in two-dimensional space.Internet Explorer 9 supports the following 2D Transforms properties:
- The -ms-transform property applies one or more two-dimensional transformation function to an element.
- The -ms-transform-origin property establishes the origin of transformation for an element. This property is useful when you want to change the default origin (the center).
Note Because the CSS 2D Transforms module has not yet received Candidate Recommendation status from the W3C, both the transformand transform-origin properties must be used with the -ms- prefix to be recognized by Internet Explorer 9. For more information on vendor-specific prefixes, see “ IE9, Vendor Prefixes, and Developers ” on the IE Team Blog.Internet Explorer 9 supports the following transformation functions for use with the -ms-transform property:
- The matrix(a,b,c,d,e,f) function specifies a 2D transformation in the form of a transformation matrix of six values (a through f).
- The translate(tx,[ty]) function specifies a 2D translation by the vector [tx,ty], where tx is the first translation-value parameter and ty is the optional second translation-value parameter. If ty is not specified, its value is zero. (Translation-value parameters can be either percentages or lengths.)
- The translateX(tx) function specifies a translation by the given amount in the x direction.
- The translateY(ty) function specifies a translation by the given amount in the y direction.
- The scale(sx,[sy]) function specifies a 2D scale operation by the [sx,sy] scaling vector that is described by the two parameters. If the second parameter is not provided, it takes a value equal to the first.
- The scaleX(sx) function specifies a scale operation by using the [sx,1] scaling vector, where sx is given as the parameter.
- The scaleY(sy) function specifies a scale operation by using the [1,sy] scaling vector, where sy is given as the parameter.
- The rotate(angle) function specifies a 2D rotation by the angle specified in the parameter about the origin of the element, as defined by the transform-origin property.
- The skewX(ax) function specifies a skew transformation along the x-axis by the given angle.
- The skewY(ay) function specifies a skew transformation along the y-axis by the given angle.
- The skew(ax,[ay]) function specifies a skew transformation along the x- and y-axes. The first angle parameter specifies the skew on the x-axis. The second angle parameter specifies the skew on the y-axis. If the second parameter is not given, a value of zero is used for the y angle (that is, no skew on the y-axis).
The -ms-transform-origin property accepts one or two values. Each value can be a keyword, a length, or a percentage. If the -ms-transform-origin property is not set, the transform begins in the center (equal to a -ms-transform-origin value of 50% 50%).
- The first value indicates the horizontal position (the position along the x-axis), and can be negative. This value can be a length value (in any of the supported length units ), a percentage (of the total box length), or one of the following three keywords: left (equal to 0% or a zero length), center (equal to 50% or half the box length), or right (equal to 100% or the full box length).
- The second value indicates the vertical position (the position along the y-axis), and can be negative. This value can be a length value (in any of the supported length units ), a percentage (of the total box height), or one of the following three keywords: top (equal to 0% or a zero height), center (equal to 50% or half the box height), or bottom (equal to 100% or the full box height).
If only one value is specified, the second value is assumed to be center.Consider the following markup.div { -ms-transform: translate(200px, 100px) scale(.75, .75) rotate(40deg); -ms-transform-origin: 60% 100%;}In Internet Explorer 9, setting the -ms-transform-origin property to 60% 100% sets the transform’s origin point to 60% of the length and 100% of the height of the element to be transformed. The -ms-transform property first moves the element 200 pixels in the x direction and 100 pixels in the y direction. It then scales the element by 75%. Finally, it rotates the element 40 degrees clockwise around the origin point set by the -ms-transform-origin property.For more information on CSS3 2D Transforms, see MSDN .CSS3 Backgrounds and Borders ModuleInternet Explorer 9 adds support for several features of the CSS3 Backgrounds and Borders Module . The most notable new feature, theborder-radius properties, is also the most requested CSS border feature. Internet Explorer 9 also introduces support for the following new CSS3 properties:
Internet Explorer 9 also adds functionality to the following existing CSS background and border properties:
The border-radius properties enable you to curve border corners by essentially “replacing” the hard corners with a quarter-ellipse and specifying the radii of each ellipse. The properties consist of the following:
- border-radius (The value given will specify the radius for all four corners of a box.)
For example, take a look at the following markup:border-radius: 100px 66.66px 200px 50px;
border:border:border: 10px blue double;padding: 24px;width: 400px;height: 125px;This will generate the following when applied to a text block.
CSS3 Color ModuleInternet Explorer 9 adds support for the CSS3 Color module. This module includes support for the RGBA, HSL, and HSLA color models; the opacity property; and the currentColor keyword. Internet Explorer 9 also expands support for the transparent keyword.The RGB color model has been extended to include an alpha channel, or transparency. The format of an RGBA value isrgba(red,green,blue,alpha).The red, green, and blue components are identical to those of the RGB color model, and are expressed as integers or percentages. The alpha component is expressed as a value between 0.0 (completely transparent) and 1.0 (completely opaque).For instance, to set the background color to red with 50% transparency, you can include either of the following two CSS declarations in your style sheet:background-color: rgba(255,0,0,0.5);background-color: rgba(100%,0%,0%,0.5);Be aware that though RGB values support hexadecimal notation, RGBA values do not.Internet Explorer 9 supports the CSS3 Color module’s hue-saturation-lightness (HSL) color values. In the HSL color model, “hue” is defined as the indicated color’s angle on the color wheel (for instance, red is 0 or 360, green is 120, and blue is 240). “Saturation” and “lightness” are expressed as percentages. For instance, the following CSS declaration defines a red background.background-color: hsl(0,100%,50%);Internet Explorer 9 also extends the HSL color model with an alpha channel. As with the RGBA model, the alpha channel is expressed as a value between 0.0 and 1.0. For instance, the following CSS declaration defines a red background with 50% transparency.background-color: hsla(0,100%,50%,0.5);Internet Explorer 9 adds the CSS3 Color module’s opacity property, which enables you to control transparency at the element level. Similar to the alpha component of RGBA values, the opacity value is a number that ranges between 0.0 (completely transparent) to 1.0 (completely opaque). The opacity property is available on all elements.The following example shows the opacity property on the color navy, with opacity values in increments of 0.2 from 0 to 1.<div class="opacity_sample"> <div style="background: navy; opacity: 0;"></div> <div style="background: navy; opacity: 0.2;"></div> <div style="background: navy; opacity: 0.4;"></div> <div style="background: navy; opacity: 0.6;"></div> <div style="background: navy; opacity: 0.8;"></div> <div style="background: navy; opacity: 1;"></div> </div>This example generates the following output for a 25×125-pixel div.
The CSS3 Color module makes the list of color keywords for CSS identical to that for SVG 1.0. Though SVG support is new in Internet Explorer 9, this change was implemented in Internet Explorer 8.Internet Explorer 9 introduces the CSS3 Color module’s currentColor keyword, which indicates the current value of the color property on any property that accepts color. When set on the color property itself, currentColor is equivalent to color:inherit.Internet Explorer 9 also expands the use of the transparent keyword beyond the border-color and background-color properties. It can now be used with any property that accepts the color property.CSS3 Fonts ModuleBetter typographic control has been a consistent feature of each new version of CSS. At the same time, the lack of an interoperable web font format can be frustrating. Internet Explorer 9 enhances existing support for CSS fonts to provide compliance with the CSS3 Fonts Module . It also adds support for the Web Open Font Format (WOFF) and raw TrueType fonts.The font-weight property has been updated so that Internet Explorer 9 calculates font weights as specified in the CSS3 Fonts Module.The font-size property has been updated so that each keyword’s scaling factor is as defined in the CSS3 Fonts Module. Also, keywords and HTML heading sizes are now mapped as specified in the CSS3 Fonts Module.The font-stretch property is new in Internet Explorer 9, and selects a normal, condensed, or expanded face from a font family. This property is also available as a @font-face rule descriptor.The @font-face rule enables font linking. That is, a style sheet can reference a specific font file for the browser to download and use. For instance, consider the following markup.@font-face { font-family: MyFont; src: url(http://mysite/fonts/MyFont.ttf) format("embedded-opentype"); } p {font-family: MyFont, serif; }In this example, the @font-face rule instructs the browser to go to the URL specified in the src descriptor to download the font file that contains the specified font. In Internet Explorer 8 and earlier, the src descriptor was incorrectly ignored if it contained an optional formatstring, such as the one shown in the previous example. In Internet Explorer 9, the src descriptor is parsed as expected.Internet Explorer 9 also adds support for the unicode-range descriptor, which enables you to specify the range of Unicode characters supported by a given font. For instance, the following code example specifies the range of basic ASCII characters.@font-face { font-family: MyFont; src: url(http://mysite/fonts/MyFont.ttf); unicode-range: U+0-7F; }Microsoft created Internet Explorer 9 to maximize web font choice. To that end, we have done the following:
- Added support for the Web Open Font Format (WOFF), which repackages sfnt-based font files (TrueType, OpenType, and Open Font Format fonts) by compressing each table individually using a ZIP compression format
- Added support for installable (no embedding permission bits set) raw TrueType fonts
To see an example of web fonts in Internet Explorer 9, see the “ Web Fonts ” or “ More Web Fonts ” demos on the Internet Explorer Test DriveFor more information on CSS3 fonts in Internet Explorer 9, see MSDN .CSS3 Media Queries ModuleThe CSS3 Media Queries Module specifies methods to enable web developers to scope a style sheet to a set of precise device capabilities. For instance, you might want to design pages differently for users browsing on a mobile device (that has a very small screen, limited color palette, low resolution, and so on) versus a netbook (that has a small screen, full color palette, high resolution, and so on) versus a standard computer (that has a large screen, full color palette, high resolution, and so on). The full list of media properties supported by CSS3 media queries includes width, height, device-width, device-height, orientation, aspect-ratio, device-aspect-ratio, color, color-index, monochrome, and resolution.The following declaration is a typical media query, using the @media rule.@media screen and (max-width:400px) {div {border:none;}}In this case, screen indicates the target media type, and max-width is the target media property. The declaration states that the specified rules (no border on div elements) are only to be applied when the page is displayed on a screen with a width of at most 400 pixels. You can use media properties together to create even more specific queries, such as the following.@media screen and (max-width:400px) and (max-height:600px) {…}This declaration applies the specified rules when the medium is a screen that has a width of no more than 400 pixels and a height of no more than 600 pixels.Check out media queries in action on the Internet Explorer Test Drive site.Internet Explorer 9 introduces support for media queries in CSS, HTML, XML, and XHTML. For more information about media queries in Internet Explorer 9, see MSDN .CSS3 Namespaces ModuleInternet Explorer 9 supports much of the CSS3 Namespaces Module . CSS namespaces enable a developer to declare a default namespace for a CSS file. That is, by default, any element or attribute selector also uses that namespace.CSS namespaces also enable a developer to create namespace prefixes, which can be used later within the CSS file. Internet Explorer 9 further enables you to declare a namespace that targets SVG elements.The @namespace at-rule declares an XML namespace (and, optionally, its prefix) and associates it with a string that represents a namespace name. For example, the following rule declares a default namespace.@namespace "http://www.w3.org/1999/xhtml";The default namespace is applied to names that don’t have an explicit namespace component.If an @namespace rule is declared with a prefix, the prefix can be used in namespace-qualified names. For example, given the following namespace declaration for a namespace prfx…@namespace prfx "http://prfx.contoso.com";…the following selector matches E elements in the namespace referred to by the prfx prefix.prfx|EThe following example is slightly more complex.@namespace prfx "http://prfx.contoso.com";@namespace msft "http://msft.example.com"; p {background-color:red;}prfx|p {background-color:blue;}msft|p {background-color:green;}In this example, two namespace prefixes are created. First, p elements in any namespace are colored red. Any p elements in the prfxnamespace are then recolored blue, and p elements in the msft namespace are recolored green.The following example styles an SVG element.@namespace svg "http://www.w3.org/2000/svg";svg|circle {fill:red;}Using the namespace and declaration from this example, all circles created with SVG will be given a red fill.For more information, see the @namespace rule reference page on MSDN.CSS3 Values and Units ModuleInternet Explorer 9 adds support for many of the new values and units described in the CSS3 Values and Units Module . Most of these new values and units are required to support the other CSS3 features described in this document.Internet Explorer 9 adds support for the following new values and units:
- deg: degrees (angle unit)
- rad: radians (angle unit)
- ms: milliseconds (time unit)
- rem: font size of the root element (relative length unit)
- vw: viewport width (relative length unit)
- vh: viewport height (relative length unit)
- vm: smaller of viewport width or height (relative length unit)
- ch: zero-width (width of the zero glyph in the rendering font; relative length unit)
In addition, Internet Explorer 9 updates the attr() function that is used for generated content. It can now be applied on any property and accept multiple arguments.The following CSS3 function is new for Internet Explorer 9:
- calc(): calculates values using arithmetic operators and is usable wherever length values are allowed
For more information on CSS functions, see CSS Values and Units Reference on MSDN.CSS3 SelectorsInternet Explorer 9 supports the additions to CSS Selector syntax specified in the CSS3 Selectors Proposed Recommendation . Listed here are the selectors that are new for Internet Explorer 9. (For full details about selector support in Internet Explorer, see CSS Compatibility and Internet Explorer on MSDN.)For more information, see the CSS Selectors reference section on MSDN.To see an example of CSS3 selectors in action, go to the Internet Explorer Test Drive site.Structural pseudo-classes enable selection based on extra information in the document tree that can’t be selected using simple selectors or combinators.The following selects an E element that is the root of the document.E:rootThe following selects an E element that is the n-th child of its parent.E:nth-child(n)The following selects an E element that is the n-th child of its parent, counting from the last one.E:nth-last-child(n)The following selects an E element that is the n-th sibling of its type.E:nth-of-type(n)The following selects an E element that is the n-th sibling of its type, counting from the last one.E:nth-last-of-type(n)The following selects an E element that is the last child of its parent.E:last-childThe following selects an E element that is the first sibling of its type.E:first-of-typeThe following selects an E element that is the last sibling of its type.E:last-of-typeThe following selects an E element that is the only child of its parent.E:only-childThe following selects an E element that is the only sibling of its type.E:only-of-typeThe following selects an E element that has no children (including text nodes).E:emptyThe target pseudo-class selects the target element of the referring URI. A fragment identifier is used to identify a location within a page, and is formed using a number sign followed by an anchor identifier—for example, http://www.example.com/mypage.html#section_3.The following selects the div element of class important that is the target element of the referring URI. If the document’s URI has no fragment identifier, there is no target element.div.important:targetThe UI element states pseudo-classes are used to select UI elements (form controls such as radio buttons or check boxes) that are in a certain state—enabled, disabled, or selected (checked).The following selects an E form control element that is enabled.E:enabledThe following selects an E form control element that is disabled.E:disabledThe following selects an E form control element that is selected.E:checkedThe : indeterminate pseudo-class selects radio buttons and check boxes whose toggle states cannot be determined—they are neither checked (selected) nor unchecked (cleared). The following selects an E form control element whose state cannot be determined.E:indeterminateNote The :indeterminate pseudo-class is no longer defined in the current CSS3 specification, but is supported in many popular browsers.The negation pseudo-class takes a simple selector as an argument to select elements that are not selected by that argument. The following selects an E element that does not match the simple selector s:E:not(s)The UI element fragments pseudo-element, ::selection , is used to select any part of the page that the user has highlighted, including text within an editable text field. This pseudo-element can be applied to the color and background-color properties. The following selects any user-selected text within an E element.E::selectionNote The ::selection pseudo-element is no longer defined in the current CSS3 specification, but is supported in many popular browsers.The border-radius propertiesRGBA Color modelHSL Color ModelHSLA Color ModelThe opacity PropertyColor KeywordsFont PropertiesThe @font-face RuleWeb Font FormatsThe @namespace at-ruleStructural Pseudo-ClassesThe target Pseudo-ClassUI Element States Pseudo-ClassesThe negation Pseudo-ClassThe UI element fragments pseudo-element
Microsoft sets Windows 8 price, opens for pre-order
Microsoft Corp opened its Windows 8 operating system for pre-orders on Friday, setting the price for an upgrade to the full version of the software at $70 for a DVD pack.
Users can also wait for launch on October 26 to download the system onto their computers for $40, an offer price that will expire at the end of January. PCs running Windows XP, Vista and Windows 7 will be able to upgrade to Windows 8.Shoppers can reserve the software pack at Microsoft’s own stores, Amazon.com, Best Buy, Staples and elsewhere. Microsoft has not yet announced the price of the full software to install from scratch, as opposed to the upgrade. The current price for a comparable version of Windows 7 is $200.
Any customer who buys, or already bought, a Windows 7 PC between June 2 and the end of January 2013 will be able to get an upgrade to Windows 8 Pro for $15, a move designed to prevent a drop-off in PC sales before the launch of Windows 8.
Microsoft also said PC makers such as Acer, Asustek, Dell, HP, Samsung and Sony were also now taking pre-orders for machines with Windows 8 pre-installed.
The world’s largest software company did not mention its own Surface tablet PC, which is expected on the market at the same time as Windows 8. Microsoft has not revealed the price of the product it hopes will challenge Apple Inc’s iPad.
LAHORE: At least 50 Islamic scholars belonging to ‘Sunni Ittehad Council’ on Thursday declared Taliban’s attack on Pakistani children’s rights activist Malala Yousafzai as un-Islamic, DawnNews reported.
Sunni Ittehad Council represents ‘Barelvi‘ sect of Islam which is influenced by Sufism and defends the traditional Sufi practices from the criticisms of Islamic movements like the ‘Deobandi’, ‘Wahhabi’ and ‘Ahl al-Hadith’.The scholars issued a combined ‘fatwa’ (Islamic ruling) in Lahore which said that the Taliban’s interpretation of Islam was incorrect and was deviant from the actual interpretation of the Shariah.
The fatwa added that Taliban were misguided and their mindset was driven by ignorance.
“Islam does not stop women from acquiring education and by attacking Malala the Taliban have crossed the limits of Islam,” the fatwa added.
“Prophet Muhammad (pbuh) had regarded the sanctity of Muslim’s life and property more important than the sanctity of the ‘Kaaba’ (sacred Muslim place),” adding that the fatwa stated, “Murder of one innocent human being is equivalent to murder of entire humanity.”The Islamic ruling added that United States was the enemy of Islam and Pakistan; any kind of cooperation with the US was not in compliance with the Shariah.In response to Taliban’s interpretation of killing females for the greater good of the religion, the scholars said that Islam discourages killing of the females. Adding that, they said, “Even apostate women are not allowed to be killed in Islam.”
Pakistani Taliban had said that although they do not believe in attacking women, “whom so ever leads a campaign against Islam and Shariah is ordered to be killed by Shariah.”
TTP spokesman Ehsanullah Ehsan had argued that it is “not just allowed … but obligatory in Islam” to kill such a person involved “in leading a campaign against Shariah and (who) tries to involve whole community in such campaign, and that personality becomes a symbol of anti-Shariah campaign.”Malala had won international recognition for highlighting Taliban atrocities in Swat with a blog for the BBC three years ago, when the Islamist militants burned girls’ schools and terrorised the valley.
Her struggle resonated with tens of thousands of girls who were being denied an education by the militants across northwest Pakistan, where the government has been fighting the local Taliban since 2007.
KARACHI: Muttahida Qaumi Movement (MQM) chief Altaf Hussain on Thursday gave 24 hours ultimatum to all top muftis and ulema (clerics) of the country to openly denounce the cowardly attack on young Pakistani children’s rights activist Malala Yousafzai or else he will ‘expose’ them, DawnNews reported.
In a statement, issued by the party, Hussain vowed to expose all clerics, who will fail to condemn the attack by banned Tehrik-i-Taliban Pakistan (TTP), in his scheduled speech at the party’s workers convention on Sunday.
No comments:
Click Here To add Comment
Post a Comment
Blogger Widgets