最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

viewInheritStyle Property

Internet Development Index

Sets or retrieves a value that indicates whether the document fragment inherits the Cascading Style Sheets (CSS) styles set in the primary document.

Syntax

defaults.viewInheritStyle(v) [ = bInherit ]

Possible Values

bInheritBoolean that specifies or receives one of the following values.
trueDefault. Document fragment inherits CSS styles.
falseDocument fragment does not inherit CSS styles.

The property is read/write. The property has a default value of true.

Expressions can be used in place of the preceding value(s), as of Microsoft® Internet Explorer 5. For more information, see About Dynamic Properties.

Remarks

For more information on the CSS styles that can be inherited when viewInheritStyle is set to true, see About Viewlink CSS Inheritance. Inheritable CSS styles are only applied to elements in the document fragment that do not already have the corresponding CSS styles defined.

Examples

In the following sample a div tag contains a custom element that has an element behavior attached to it. The div tag that is located in the primary document sets a number of CSS attributes, specifically the following:

The content of the primary document is shown in the code snippet below.

<HTML xmlns:myns>
<HEAD>
<?import namespace="myns" implementation="viewInheritStyle.htc">
</HEAD>
<BODY>
<DIV style= "color:red;font-size:12pt;font-Style:italic;border:2px solid blue">
This text is inside a DIV element in the primary document.
<BR>
<!-- this is a custom element -->
<myns:abc></myns:abc>
</DIV>
</BODY>
</HTML>

The next code snippet shows the content of the HTML Component (HTC) file, viewInheritStyle.htc.

The HTC file contains a simple document fragment, which also includes a div tag that uses the following CSS styles.

  • fontSize is set to 20 pt.
  • border is set to 2px solid green.

Because the content in the primary document has CSS styles set on a div tag that contains the custom element, the div tag in the document fragment inherits the inheritable CSS Styles when the viewInheritStyle property is true.

<public:component tagName="abc">
<attach event="oncontentready" onevent=init() />
</public:component>
<script>
function init(){
defaults.viewLink=document;
defaults.viewInheritStyle = false;
docFragCaption.innerText = "viewInheritStyle is now set to false";
}
function btnChangeInheritance_onClick(){
boolInherit = defaults.viewInheritStyle;
if (boolInherit == true) {
defaults.viewInheritStyle = false;
docFragCaption.innerText = "viewInheritStyle is now set to false";
}
else
{
defaults.viewInheritStyle = true;
docFragCaption.innerText = "viewInheritStyle is now set to true";
}
}
</script>
<BODY>
<DIV id="docFragCaption" style= "font-size:20pt;border:2px solid green"></DIV>
<BR>
<INPUT id=btnChangeInheritance type=button value="Toggle viewInheritStyle property" onclick="btnChangeInheritance_onClick()">
</BODY>

Run the sample to verify that the inheritable CSS styles from the primary document are applied to the document fragment. In this example, the inherited CSS styles are the fontStyle and color properties.

In this example, the border property is not inherited for two reasons. First, the border property not an inheritable property, and second, the property is set explicitly on the div tag in the document fragment.

This feature requires Microsoft® Internet Explorer 5 or later. Click the following icon to install the latest version. Then reload this page to view the sample.

Standards Information

There is no public standard that applies to this property.

Applies To

defaults

See Also

Introduction to Viewlink, About Viewlink CSS Inheritance, About Element Behaviors
中卫市| 绥宁县| 南丹县| 深泽县| 东丰县| 曲松县| 建平县| 陇川县| 灯塔市| 桦甸市| 诏安县| 阳山县| 蓝田县| 南开区| 荥经县| 洛南县| 中西区| 始兴县| 什邡市| 贵阳市| 定日县| 仁怀市| 霞浦县| 横峰县| 诏安县| 门源| 寻甸| 曲周县| 太谷县| 长治县| 穆棱市| 永济市| 宜昌市| 上虞市| 乌拉特前旗| 高州市| 永春县| 克东县| 大港区| 聂荣县| 汉川市|