0

我对 css 和 Sencha Touch 2 非常陌生。在编写有关 Sencha Touch 2 的一些教程时,我看到一个 CSS 文件的代码如下

/* Increase height of list item so title and narrative fit */
.x-list .x-list-item {
     min-height: 10.5em!important;
     height:7.5em;
}
/* Move the disclosure button up to account for the list item height increase */
.x-list .x-list-disclosure {
     position: absolute;
     bottom: 4.0em;
     right: 0.10em;
}

.x-list .x-list-item 一个css嵌套概念和x-list 一个类名吗?另外,这个概念是纯 CSS 概念还是 Sencha Touch 概念?

4

1 回答 1

1

它只是一个纯 CSS 概念,所以这个语法意味着

.x-list .x-list-item 

选择x-list-item嵌套在具有类的元素下的具有类的元素x-list

第二种语法也是如此。

如果你想让它更严格,你可以使用element.class选择器,这样它只会在它匹配element.class组合时选择,所以如果你举个例子..

使用类似的东西

div.x-list span.x-list-item {
   /* This will select span only which is having a class 
      x-list-item which is nested under div element having class 
      x-list */
}
于 2013-07-24T05:28:01.313 回答