我是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概念?
答案 0 :(得分: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 */
}