欢迎来到人人网开放平台 人人网首页
登录/创建账户

[编辑] XNCSS与CSS的异同

  1. 所有样式会被自动添加一级类选择器".app_content_appId",以便将样式的作用范围控制在canvas内(canvas页面的父div的class属性为"app_content_appId");
  2. 样式中的id选择器会被重命名,加上一个前缀"app" + appid + "_",例如"divId"会被重命名为"app12345_divId",其中12345为当前app的id;
  3. XNML中所有DOM节点的ID属性(如果有的话)也会被重命名,规则同上;
  4. 不支持expression;

[编辑] XNCSS使用方法

  1. 可以在XNML页面内使用style标签来嵌入CSS;
  2. 也可以使用link标签来引用外部的CSS文件,详见CSS/JavaScript外部引用文件

[编辑] 开放的CSS属性列表

    Classification
  • list-style
  • list-style-image
  • list-style-position
  • list-style-type
  • Color and Background

  • background
  • background-attachment
  • background-color
  • background-image
  • background-position
  • background-position-x
  • background-position-y
  • background-repeat
  • color
  • Font and Text

  • counter-increment
  • counter-reset
  • direction
  • font
  • font-family
  • font-size
  • font-style
  • font-variant
  • font-weight
  • ime-mode
  • layout-flow
  • layout-grid
  • layout-grid-char
  • layout-grid-line
  • layout-grid-mode
  • layout-grid-type
  • letter-spacing
  • line-break
  • line-height
  • ruby-align
  • ruby-overhang
  • ruby-position
  • text-align
  • text-align-last
  • text-autospace
  • text-decoration
  • text-indent
  • text-justify
  • text-kashida-space
  • text-overflow
  • proposed
  • text-transform
  • text-underline-position
  • unicode-bidi
  • vertical-align
  • white-space
  • word-break
  • word-spacing
  • word-wrap
  • writing-mode
  • Layout

  • border
  • border-bottom
  • border-bottom-color
  • border-bottom-style
  • border-bottom-width
  • border-collapse
  • border-color
  • border-left
  • border-left-color
  • border-left-style
  • border-left-width
  • border-right
  • border-right-color
  • border-right-style
  • border-right-width
  • border-spacing
  • border-style
  • border-top
  • border-top-color
  • border-top-style
  • border-top-width
  • border-width
  • caption-side
  • clear
  • float
  • margin
  • margin-bottom
  • margin-left
  • margin-right
  • margin-top
  • padding
  • padding-bottom
  • padding-left
  • padding-right
  • padding-top
  • table-layout
  • Positioning

  • bottom
  • clip
  • display
  • height
  • left
  • max-height
  • max-width
  • min-height
  • min-width
  • overflow
  • overflow-x
  • overflow-y
  • position
  • right
  • top
  • visibility
  • width
  • z-index
  • User Interface

  • accelerator
  • cursor
  • outline
  • outline-color
  • outline-style
  • outline-width
  • scrollbar-3dlight-color
  • scrollbar-arrow-color
  • scrollbar-base-color
  • scrollbar-darkshadow-color
  • scrollbar-face-color
  • scrollbar-highlight-color
  • scrollbar-shadow-color
  • zoom