`
fixopen
  • 浏览: 83777 次
文章分类
社区版块
存档分类
最新评论

Style&CSS的编程接口

阅读更多
interface StyleSheet {
  readonly attribute DOMString        type;
           attribute boolean          disabled;
  readonly attribute Node             ownerNode;
  readonly attribute StyleSheet       parentStyleSheet;
  readonly attribute DOMString        href;
  readonly attribute DOMString        title;
  readonly attribute MediaList        media;
};

interface StyleSheetList {
  readonly attribute unsigned long    length;
  StyleSheet         item(in unsigned long index);
};

interface MediaList {
           attribute DOMString        mediaText;
                                        // raises(DOMException) on setting

  readonly attribute unsigned long    length;
  DOMString          item(in unsigned long index);
  void               deleteMedium(in DOMString oldMedium) raises(DOMException);
  void               appendMedium(in DOMString newMedium) raises(DOMException);
};

interface LinkStyle {
  readonly attribute StyleSheet       sheet;
};

interface DocumentStyle {
  readonly attribute StyleSheetList   styleSheets;
};

interface CSSStyleSheet : stylesheets::StyleSheet {
  readonly attribute CSSRule          ownerRule;
  readonly attribute CSSRuleList      cssRules;
  unsigned long      insertRule(in DOMString rule, in unsigned long index) raises(DOMException);
  void               deleteRule(in unsigned long index) raises(DOMException);
};

interface CSSRuleList {
  readonly attribute unsigned long    length;
  CSSRule            item(in unsigned long index);
};

interface CSSRule {
  // RuleType
  const unsigned short      UNKNOWN_RULE                   = 0;
  const unsigned short      STYLE_RULE                     = 1;
  const unsigned short      CHARSET_RULE                   = 2;
  const unsigned short      IMPORT_RULE                    = 3;
  const unsigned short      MEDIA_RULE                     = 4;
  const unsigned short      FONT_FACE_RULE                 = 5;
  const unsigned short      PAGE_RULE                      = 6;

  readonly attribute unsigned short   type;
           attribute DOMString        cssText;
                                        // raises(DOMException) on setting
  readonly attribute CSSStyleSheet    parentStyleSheet;
  readonly attribute CSSRule          parentRule;
};

interface CSSStyleRule : CSSRule {
           attribute DOMString        selectorText;
                                        // raises(DOMException) on setting
  readonly attribute CSSStyleDeclaration  style;
};

interface CSSMediaRule : CSSRule {
  readonly attribute stylesheets::MediaList  media;
  readonly attribute CSSRuleList      cssRules;
  unsigned long      insertRule(in DOMString rule, in unsigned long index) raises(DOMException);
  void               deleteRule(in unsigned long index) raises(DOMException);
};

interface CSSFontFaceRule : CSSRule {
  readonly attribute CSSStyleDeclaration  style;
};

interface CSSPageRule : CSSRule {
           attribute DOMString        selectorText;
                                        // raises(DOMException) on setting
  readonly attribute CSSStyleDeclaration  style;
};

interface CSSImportRule : CSSRule {
  readonly attribute DOMString        href;
  readonly attribute stylesheets::MediaList  media;
  readonly attribute CSSStyleSheet    styleSheet;
};

interface CSSCharsetRule : CSSRule {
           attribute DOMString        encoding;
                                        // raises(DOMException) on setting
};

interface CSSUnknownRule : CSSRule {
};

interface CSSStyleDeclaration {
           attribute DOMString        cssText;
                                        // raises(DOMException) on setting
  DOMString          getPropertyValue(in DOMString propertyName);
  CSSValue           getPropertyCSSValue(in DOMString propertyName);
  DOMString          removeProperty(in DOMString propertyName) raises(DOMException);
  DOMString          getPropertyPriority(in DOMString propertyName);
  void               setProperty(in DOMString propertyName, in DOMString value, in DOMString priority) raises(DOMException);
  readonly attribute unsigned long    length;
  DOMString          item(in unsigned long index);
  readonly attribute CSSRule          parentRule;
};

interface CSSValue {
  // UnitTypes
  const unsigned short      CSS_INHERIT                    = 0;
  const unsigned short      CSS_PRIMITIVE_VALUE            = 1;
  const unsigned short      CSS_VALUE_LIST                 = 2;
  const unsigned short      CSS_CUSTOM                     = 3;
           attribute DOMString        cssText;
                                        // raises(DOMException) on setting

  readonly attribute unsigned short   cssValueType;
};

interface CSSPrimitiveValue : CSSValue {
  // UnitTypes
  const unsigned short      CSS_UNKNOWN                    = 0;
  const unsigned short      CSS_NUMBER                     = 1;
  const unsigned short      CSS_PERCENTAGE                 = 2;
  const unsigned short      CSS_EMS                        = 3;
  const unsigned short      CSS_EXS                        = 4;
  const unsigned short      CSS_PX                         = 5;
  const unsigned short      CSS_CM                         = 6;
  const unsigned short      CSS_MM                         = 7;
  const unsigned short      CSS_IN                         = 8;
  const unsigned short      CSS_PT                         = 9;
  const unsigned short      CSS_PC                         = 10;
  const unsigned short      CSS_DEG                        = 11;
  const unsigned short      CSS_RAD                        = 12;
  const unsigned short      CSS_GRAD                       = 13;
  const unsigned short      CSS_MS                         = 14;
  const unsigned short      CSS_S                          = 15;
  const unsigned short      CSS_HZ                         = 16;
  const unsigned short      CSS_KHZ                        = 17;
  const unsigned short      CSS_DIMENSION                  = 18;
  const unsigned short      CSS_STRING                     = 19;
  const unsigned short      CSS_URI                        = 20;
  const unsigned short      CSS_IDENT                      = 21;
  const unsigned short      CSS_ATTR                       = 22;
  const unsigned short      CSS_COUNTER                    = 23;
  const unsigned short      CSS_RECT                       = 24;
  const unsigned short      CSS_RGBCOLOR                   = 25;

  readonly attribute unsigned short   primitiveType;
  void               setFloatValue(in unsigned short unitType, in float floatValue) raises(DOMException);
  float              getFloatValue(in unsigned short unitType) raises(DOMException);
  void               setStringValue(in unsigned short stringType, in DOMString stringValue) raises(DOMException);
  DOMString          getStringValue() raises(DOMException);
  Counter            getCounterValue() raises(DOMException);
  Rect               getRectValue() raises(DOMException);
  RGBColor           getRGBColorValue() raises(DOMException);
};

interface CSSValueList : CSSValue {
  readonly attribute unsigned long    length;
  CSSValue           item(in unsigned long index);
};

interface RGBColor {
  readonly attribute CSSPrimitiveValue  red;
  readonly attribute CSSPrimitiveValue  green;
  readonly attribute CSSPrimitiveValue  blue;
};

interface Rect {
  readonly attribute CSSPrimitiveValue  top;
  readonly attribute CSSPrimitiveValue  right;
  readonly attribute CSSPrimitiveValue  bottom;
  readonly attribute CSSPrimitiveValue  left;
};

interface Counter {
  readonly attribute DOMString        identifier;
  readonly attribute DOMString        listStyle;
  readonly attribute DOMString        separator;
};

interface ViewCSS : views::AbstractView {
  CSSStyleDeclaration getComputedStyle(in Element elt, in DOMString pseudoElt);
};

interface DocumentCSS : stylesheets::DocumentStyle {
  CSSStyleDeclaration getOverrideStyle(in Element elt, in DOMString pseudoElt);
};

interface DOMImplementationCSS : DOMImplementation {
  CSSStyleSheet      createCSSStyleSheet(in DOMString title, in DOMString media) raises(DOMException);
};

interface ElementCSSInlineStyle {
  readonly attribute CSSStyleDeclaration  style;
};

interface CSS2Properties {
           attribute DOMString        azimuth;
                                        // raises(DOMException) on setting
           attribute DOMString        background;
                                        // raises(DOMException) on setting
           attribute DOMString        backgroundAttachment;
                                        // raises(DOMException) on setting
           attribute DOMString        backgroundColor;
                                        // raises(DOMException) on setting
           attribute DOMString        backgroundImage;
                                        // raises(DOMException) on setting
           attribute DOMString        backgroundPosition;
                                        // raises(DOMException) on setting
           attribute DOMString        backgroundRepeat;
                                        // raises(DOMException) on setting
           attribute DOMString        border;
                                        // raises(DOMException) on setting
           attribute DOMString        borderCollapse;
                                        // raises(DOMException) on setting
           attribute DOMString        borderColor;
                                        // raises(DOMException) on setting
           attribute DOMString        borderSpacing;
                                        // raises(DOMException) on setting
           attribute DOMString        borderStyle;
                                        // raises(DOMException) on setting
           attribute DOMString        borderTop;
                                        // raises(DOMException) on setting
           attribute DOMString        borderRight;
                                        // raises(DOMException) on setting
           attribute DOMString        borderBottom;
                                        // raises(DOMException) on setting
           attribute DOMString        borderLeft;
                                        // raises(DOMException) on setting
           attribute DOMString        borderTopColor;
                                        // raises(DOMException) on setting
           attribute DOMString        borderRightColor;
                                        // raises(DOMException) on setting
           attribute DOMString        borderBottomColor;
                                        // raises(DOMException) on setting
           attribute DOMString        borderLeftColor;
                                        // raises(DOMException) on setting
           attribute DOMString        borderTopStyle;
                                        // raises(DOMException) on setting
           attribute DOMString        borderRightStyle;
                                        // raises(DOMException) on setting
           attribute DOMString        borderBottomStyle;
                                        // raises(DOMException) on setting
           attribute DOMString        borderLeftStyle;
                                        // raises(DOMException) on setting
           attribute DOMString        borderTopWidth;
                                        // raises(DOMException) on setting
           attribute DOMString        borderRightWidth;
                                        // raises(DOMException) on setting
           attribute DOMString        borderBottomWidth;
                                        // raises(DOMException) on setting
           attribute DOMString        borderLeftWidth;
                                        // raises(DOMException) on setting
           attribute DOMString        borderWidth;
                                        // raises(DOMException) on setting
           attribute DOMString        bottom;
                                        // raises(DOMException) on setting
           attribute DOMString        captionSide;
                                        // raises(DOMException) on setting
           attribute DOMString        clear;
                                        // raises(DOMException) on setting
           attribute DOMString        clip;
                                        // raises(DOMException) on setting
           attribute DOMString        color;
                                        // raises(DOMException) on setting
           attribute DOMString        content;
                                        // raises(DOMException) on setting
           attribute DOMString        counterIncrement;
                                        // raises(DOMException) on setting
           attribute DOMString        counterReset;
                                        // raises(DOMException) on setting
           attribute DOMString        cue;
                                        // raises(DOMException) on setting
           attribute DOMString        cueAfter;
                                        // raises(DOMException) on setting
           attribute DOMString        cueBefore;
                                        // raises(DOMException) on setting
           attribute DOMString        cursor;
                                        // raises(DOMException) on setting
           attribute DOMString        direction;
                                        // raises(DOMException) on setting
           attribute DOMString        display;
                                        // raises(DOMException) on setting
           attribute DOMString        elevation;
                                        // raises(DOMException) on setting
           attribute DOMString        emptyCells;
                                        // raises(DOMException) on setting
           attribute DOMString        cssFloat;
                                        // raises(DOMException) on setting
           attribute DOMString        font;
                                        // raises(DOMException) on setting
           attribute DOMString        fontFamily;
                                        // raises(DOMException) on setting
           attribute DOMString        fontSize;
                                        // raises(DOMException) on setting
           attribute DOMString        fontSizeAdjust;
                                        // raises(DOMException) on setting
           attribute DOMString        fontStretch;
                                        // raises(DOMException) on setting
           attribute DOMString        fontStyle;
                                        // raises(DOMException) on setting
           attribute DOMString        fontVariant;
                                        // raises(DOMException) on setting
           attribute DOMString        fontWeight;
                                        // raises(DOMException) on setting
           attribute DOMString        height;
                                        // raises(DOMException) on setting
           attribute DOMString        left;
                                        // raises(DOMException) on setting
           attribute DOMString        letterSpacing;
                                        // raises(DOMException) on setting
           attribute DOMString        lineHeight;
                                        // raises(DOMException) on setting
           attribute DOMString        listStyle;
                                        // raises(DOMException) on setting
           attribute DOMString        listStyleImage;
                                        // raises(DOMException) on setting
           attribute DOMString        listStylePosition;
                                        // raises(DOMException) on setting
           attribute DOMString        listStyleType;
                                        // raises(DOMException) on setting
           attribute DOMString        margin;
                                        // raises(DOMException) on setting
           attribute DOMString        marginTop;
                                        // raises(DOMException) on setting
           attribute DOMString        marginRight;
                                        // raises(DOMException) on setting
           attribute DOMString        marginBottom;
                                        // raises(DOMException) on setting
           attribute DOMString        marginLeft;
                                        // raises(DOMException) on setting
           attribute DOMString        markerOffset;
                                        // raises(DOMException) on setting
           attribute DOMString        marks;
                                        // raises(DOMException) on setting
           attribute DOMString        maxHeight;
                                        // raises(DOMException) on setting
           attribute DOMString        maxWidth;
                                        // raises(DOMException) on setting
           attribute DOMString        minHeight;
                                        // raises(DOMException) on setting
           attribute DOMString        minWidth;
                                        // raises(DOMException) on setting
           attribute DOMString        orphans;
                                        // raises(DOMException) on setting
           attribute DOMString        outline;
                                        // raises(DOMException) on setting
           attribute DOMString        outlineColor;
                                        // raises(DOMException) on setting
           attribute DOMString        outlineStyle;
                                        // raises(DOMException) on setting
           attribute DOMString        outlineWidth;
                                        // raises(DOMException) on setting
           attribute DOMString        overflow;
                                        // raises(DOMException) on setting
           attribute DOMString        padding;
                                        // raises(DOMException) on setting
           attribute DOMString        paddingTop;
                                        // raises(DOMException) on setting
           attribute DOMString        paddingRight;
                                        // raises(DOMException) on setting
           attribute DOMString        paddingBottom;
                                        // raises(DOMException) on setting
           attribute DOMString        paddingLeft;
                                        // raises(DOMException) on setting
           attribute DOMString        page;
                                        // raises(DOMException) on setting
           attribute DOMString        pageBreakAfter;
                                        // raises(DOMException) on setting
           attribute DOMString        pageBreakBefore;
                                        // raises(DOMException) on setting
           attribute DOMString        pageBreakInside;
                                        // raises(DOMException) on setting
           attribute DOMString        pause;
                                        // raises(DOMException) on setting
           attribute DOMString        pauseAfter;
                                        // raises(DOMException) on setting
           attribute DOMString        pauseBefore;
                                        // raises(DOMException) on setting
           attribute DOMString        pitch;
                                        // raises(DOMException) on setting
           attribute DOMString        pitchRange;
                                        // raises(DOMException) on setting
           attribute DOMString        playDuring;
                                        // raises(DOMException) on setting
           attribute DOMString        position;
                                        // raises(DOMException) on setting
           attribute DOMString        quotes;
                                        // raises(DOMException) on setting
           attribute DOMString        richness;
                                        // raises(DOMException) on setting
           attribute DOMString        right;
                                        // raises(DOMException) on setting
           attribute DOMString        size;
                                        // raises(DOMException) on setting
           attribute DOMString        speak;
                                        // raises(DOMException) on setting
           attribute DOMString        speakHeader;
                                        // raises(DOMException) on setting
           attribute DOMString        speakNumeral;
                                        // raises(DOMException) on setting
           attribute DOMString        speakPunctuation;
                                        // raises(DOMException) on setting
           attribute DOMString        speechRate;
                                        // raises(DOMException) on setting
           attribute DOMString        stress;
                                        // raises(DOMException) on setting
           attribute DOMString        tableLayout;
                                        // raises(DOMException) on setting
           attribute DOMString        textAlign;
                                        // raises(DOMException) on setting
           attribute DOMString        textDecoration;
                                        // raises(DOMException) on setting
           attribute DOMString        textIndent;
                                        // raises(DOMException) on setting
           attribute DOMString        textShadow;
                                        // raises(DOMException) on setting
           attribute DOMString        textTransform;
                                        // raises(DOMException) on setting
           attribute DOMString        top;
                                        // raises(DOMException) on setting
           attribute DOMString        unicodeBidi;
                                        // raises(DOMException) on setting
           attribute DOMString        verticalAlign;
                                        // raises(DOMException) on setting
           attribute DOMString        visibility;
                                        // raises(DOMException) on setting
           attribute DOMString        voiceFamily;
                                        // raises(DOMException) on setting
           attribute DOMString        volume;
                                        // raises(DOMException) on setting
           attribute DOMString        whiteSpace;
                                        // raises(DOMException) on setting
           attribute DOMString        widows;
                                        // raises(DOMException) on setting
           attribute DOMString        width;
                                        // raises(DOMException) on setting
           attribute DOMString        wordSpacing;
                                        // raises(DOMException) on setting
           attribute DOMString        zIndex;
                                        // raises(DOMException) on setting
};
分享到:
评论

相关推荐

    HTML&CSS&JAVASCRIPT

    CSS(Cascading Style Sheets)则负责网页的样式和布局。通过CSS,你可以控制字体、颜色、间距、布局和响应式设计等。选择器(如类选择器、ID选择器和元素选择器)是CSS的核心,通过它们来指定要应用样式的元素。盒...

    现代Web程序设计(HTML&CSS;)

    CSS(Cascading Style Sheets)是一种样式表语言,用于描述HTML文档的外观和格式。 - **选择器**:CSS通过选择器来指定哪些HTML元素应用样式。常见的选择器有类型选择器、类选择器、ID选择器等。 - **属性与值**:...

    css+div布局和css教程和css的api

    接下来,我们提到的“CSS的API”可能是指CSS规范中的函数或接口,虽然CSS本身并不像JavaScript那样提供完整的编程接口,但CSS Level 2.0引入了一些高级特性,如条件注释(@media)、伪类(:hover、:active、:focus)...

    CSS格式化工具

    在Web开发中,CSS(Cascading Style Sheets)是用于控制网页元素样式的重要语言。然而,随着项目规模的扩大,CSS代码可能会变得杂乱无章,难以维护。这时,CSS格式化工具就显得尤为重要。它们能够帮助开发者整理混乱...

    js中的css理解

    DOM是一个基于标准的、统一的编程接口,允许JavaScript等脚本语言与HTML或XML文档进行交互。通过DOM,我们可以查找、遍历和修改文档的结构。 1. 获取和设置CSS样式: JavaScript提供了`style`属性来访问和修改元素...

    javascript css html 中文帮助手册

    **CSS(Cascading Style Sheets)** CSS是用于控制网页样式的语言,让开发者可以独立于HTML内容来定义布局、颜色、字体等视觉表现。CSS2.0中文手册.chm涵盖了选择器、盒模型、定位、层叠、动画和过渡等内容。CSS2.0...

    CSS设计彻底研究

    在HTML与DOM(Document Object Model)的关系中,DOM是HTML文档的一种结构化表示,允许通过编程接口来操作和修改文档内容。CSS与DOM结合,可以实现动态改变网页样式,提升用户体验。通过选择器选取DOM中的特定元素,...

    HTML+CSS+JavaScript编程入门指南源码(明日科技编)

    CSS(Cascading Style Sheets)负责网页的样式和布局。通过CSS,我们可以控制字体、颜色、间距、布局和响应式设计。CSS选择器允许我们根据元素的类型、类、ID或其他属性来应用样式。例如,`body {color: blue;}`将...

    CSS+DOM+DHTML+CSSFILTER+JAVASCRIPT帮助文档合集(CHM格式)

    DOM文档对象中文手册.chm提供了对DOM接口和方法的详尽指南,帮助开发者了解如何通过编程方式访问和修改文档内容、结构以及样式。通过DOM,JavaScript或其他支持的语言可以轻松地添加、删除或更新网页元素。 **DHTML...

    CSS_namespace_thrift接口文档

    标题“CSS_namespace_thrift接口文档”提示我们,这个文档可能涉及到Thrift在CSS(可能是“Custom Service System”或“Cascading Style Sheets”的缩写,但在此场景下前者更合理)项目中的应用,尤其是在命名空间...

    js 动态修改css文件用到了cssRule

    对于跨浏览器兼容性问题,`cssRule`的使用是安全的,因为`document.styleSheets`和`cssRules`是W3C标准的DOM接口。不过,在操作这些属性之前,需要确保浏览器支持这些接口,因为早期浏览器可能不支持`cssRules`,在...

    css&javascript帮助查询文档

    CSS,全称为Cascading Style Sheets,是一种用于描述HTML或XML(包括如SVG、MathML等各种XML方言)文档样式的样式表语言。它的主要功能是将样式从内容中分离出来,使得网页设计更加灵活且易于维护。CSS允许你控制...

    css 手册 各种参数详细说明

    **CSS(层叠样式表)**是用于控制网页元素外观的一种编程语言,它与HTML或XML(包括SVG、XHTML等)一起工作,为网页带来了丰富的样式和布局能力。CSS手册是开发者的重要参考资料,其中包含了各种参数的详细说明,...

    JavaSE html+CSS基础笔记归纳.zip

    在Java面试中,通常会涉及面向对象编程概念(如封装、继承、多态),集合框架(List、Set、Map接口及其实现类),异常处理,IO流,线程同步,JVM内存模型,设计模式,Spring框架等知识点。面试题可能包括编程题,也...

    javascript+css+dhtml api(chm版本)

    此外,JavaScript可以通过`window.getComputedStyle()`或`element.style`等方法与CSS进行交互,获取或修改元素的样式。 **DHTML API** DHTML API主要涉及HTML、CSS和JavaScript的结合使用。通过JavaScript,可以...

    css.zip_javascript

    CSSOM是CSS的编程接口,JavaScript可以读取和修改CSS样式表。通过`window.getComputedStyle()`,我们可以获取元素在特定上下文中的计算样式。 7. **CSS动画与JavaScript**: CSS动画可以通过`animation`和`...

    HTML+CSS+JavaScript

    CSS(Cascading Style Sheets)是用于描述HTML或XML(包括如SVG、MathML等各种XML方言)文档样式的样式表语言。CSS允许我们将样式与内容分离,使网页设计更加灵活和易于维护。通过选择器(如类名、ID名、标签名等)...

    CSS实例教程-十步学会用CSS建站.docx

    7. DOM(文档对象模型):它是HTML和XML文档的编程接口,允许程序和脚本动态更新、添加、删除和改变元素。 8. 图像格式:JPEG适合高质量照片,GIF适用于动画和简单图形,PNG提供透明度支持。 9. CSS布局技术:包括...

    级联菜单js+css

    1. **DOM操作**:Document Object Model(DOM)是HTML和XML文档的编程接口。通过DOM,我们可以选择、修改和操作页面上的元素。在创建级联菜单时,我们可能需要获取或改变菜单项的属性,比如显示/隐藏状态。 2. **...

    css.rar_V2

    在IT行业中,CSS(Cascading Style Sheets)是一种用于描述HTML或XML(包括如SVG、MathML等各种XML方言)文档样式的样式表语言。在这个名为"css.rar_V2"的压缩包中,我们有两个文件:`css.c`和`css.h`。这通常意味着...

Global site tag (gtag.js) - Google Analytics