GWT 2.6.1 CellList 媒体查询
GWT 2.6.1 CellList MediaQuery
我想知道是否可以将媒体查询与 CellList 一起使用。例如:
interface MyStyle extends Style {
}
public interface MyResources extends Resources {
@Source({ Style.DEFAULT_CSS, "MyStyle.css" })
MyStyle cellListStyle();
}
然后我有 CellList CSS 文件 "MyStyle.css" :
/* cell flow basic css style */
.cellListWidget {
}
.cellListEvenItem {
}
.cellListOddItem {
}
.cellListEvenItem:hover,.cellListOddItem:hover {
}
.cellListKeyboardSelectedItem,.cellListSelectedItem:hover {
}
.cellListSelectedItem {
}
有没有可能有这样的东西
@media ( min-width : 768px) {
.cellListEvenItem {
height: 90px;
}
}
在 MyStyle.css 里面?我试过了,它似乎无法识别它(没有错误或警告,但它也不起作用)。
我是这样使用的:
new CellList<MyObject>(listCell,
(CellList.Resources) GWT.create(MyResources.class));
如果上述方法不可行,是否有任何解决方法可以实现此目的?
谢谢。
CSS 资源不允许使用 CSS3 媒体查询。
您必须在 GWT 2.7 版中使用名为 GSS 的新样式表编译器。
您必须将项目更新到版本 2.7。
在您的 gwt.xml 中添加此行以激活新的 GSS:
<set-configuration-property name="CssResource.enableGss" value="true" />
并将您的 css 文件重命名为 MyStyle.gss
您可能需要更改一些 CSS 资源代码:
http://www.gwtproject.org/doc/latest/DevGuideGssVsCss.html
您可以在上次 GwtCreate 的演示中了解更多信息:
https://drive.google.com/file/d/0BwVGJUurq6uVNGgtOWtOdy0wRzQ/view
我想知道是否可以将媒体查询与 CellList 一起使用。例如:
interface MyStyle extends Style {
}
public interface MyResources extends Resources {
@Source({ Style.DEFAULT_CSS, "MyStyle.css" })
MyStyle cellListStyle();
}
然后我有 CellList CSS 文件 "MyStyle.css" :
/* cell flow basic css style */
.cellListWidget {
}
.cellListEvenItem {
}
.cellListOddItem {
}
.cellListEvenItem:hover,.cellListOddItem:hover {
}
.cellListKeyboardSelectedItem,.cellListSelectedItem:hover {
}
.cellListSelectedItem {
}
有没有可能有这样的东西
@media ( min-width : 768px) {
.cellListEvenItem {
height: 90px;
}
}
在 MyStyle.css 里面?我试过了,它似乎无法识别它(没有错误或警告,但它也不起作用)。
我是这样使用的:
new CellList<MyObject>(listCell,
(CellList.Resources) GWT.create(MyResources.class));
如果上述方法不可行,是否有任何解决方法可以实现此目的?
谢谢。
CSS 资源不允许使用 CSS3 媒体查询。 您必须在 GWT 2.7 版中使用名为 GSS 的新样式表编译器。
您必须将项目更新到版本 2.7。
在您的 gwt.xml 中添加此行以激活新的 GSS:
<set-configuration-property name="CssResource.enableGss" value="true" />
并将您的 css 文件重命名为 MyStyle.gss
您可能需要更改一些 CSS 资源代码: http://www.gwtproject.org/doc/latest/DevGuideGssVsCss.html
您可以在上次 GwtCreate 的演示中了解更多信息: https://drive.google.com/file/d/0BwVGJUurq6uVNGgtOWtOdy0wRzQ/view