让我们从语句开始,这是我在7年多来建立的第一个UI。我不记得任何关于他们的事情,当时对他们一无所知。我是一个中间人,所以我正在用这些东西重新学习。
我正在尝试在GWT 2.5中构建一个cssresource包。我的UX家伙给了我这个css
@CHARSET "ISO-8859-1";
* {
box-sizing: border-box;
}
html, body { min-height: 100%; }
a { text-decoration: none; }
.mainheader {
background: linear-gradient(#3F94BF, #246485);
padding: 5px;
text-align: center;
color: white;
text-shadow: #222 0px -1px 1px;
position: fixed;
width: 100%;
left: 0;
transition: all 0.3s ease;
a {
position: absolute;
left: 20px;
top: 20px;
color: white;
font-size: 32px;
}
}
.pagewrap {
float: right;
width: 100%;
transition: width 0.3s ease;
}
.mainnav {
position: fixed;
top: 0;
width: 0;
height: 100%;
background: #3B3B3B;
overflow: hidden;
transition: width 0.3s ease;
a {
display: block;
background: linear-gradient(#3E3E3E, #383838);
border-top: 1px solid #484848;
border-bottom: 1px solid #2E2E2E;
color: white;
padding: 15px;
&:hover, &:focus {
background: linear-gradient(#484848, #383838);
}
}
&:after {
content: "";
position: absolute;
top: 0;
right: 0;
height: 100%;
width: 34px;
background: linear-gradient(left, rgba(black, 0), rgba(black, 0.4));
}
}
.content {
padding: 100px 20px 20px 20px;
}
.closemenu {
display: none;
}
#mainnav:target {
width: 20%;
}
#mainnav:target + .pagewrap {
width: 80%;
.open-menu {
display: none;
}
.closemenu {
display: block;
}
.mainheader {
width: 80%;
left: 20%;
}
}
现在,当我把它放入时,我会收到以下错误:
[DEBUG] [myapp] - Rebinding nope.gwt.client.resources.ITRResources
[DEBUG] [myapp] - Invoking generator com.google.gwt.resources.rebind.context.InlineClientBundleGenerator
[DEBUG] [myapp] - Preparing method css
[INFO] [myapp] - The following problems were detected
[WARN] [myapp] - Line 20 column 4: encountered "{". Was expecting one of: ":"
[WARN] [myapp] - Line 43 column 4: encountered "{". Was expecting one of: ":"
[WARN] [myapp] - Line 49 column 19: encountered "&". Was expecting one of: "}" ";" <IDENT>
[WARN] [myapp] - Line 77 column 14: encountered ".". Was expecting one of: "}" ";" <IDENT>
[DEBUG] [myapp] - Rebinding nope.gwt.client.uibinder.SearchPanel.SearchPanelUiBinder
[DEBUG] [myapp] - Invoking generator com.google.gwt.uibinder.rebind.UiBinderGenerator
[ERROR] [myapp] - The content of elements must consist of well-formed character data or markup.
[ERROR] [myapp] - Error parsing XML (line 35): The content of elements must consist of well-formed character data or markup.
[ERROR] [myapp] - Deferred binding failed for 'nope.gwt.client.uibinder.SearchPanel.SearchPanelUiBinder'; expect subsequent failures
[DEBUG] [myapp] - Rebinding com.google.gwt.dom.client.DOMImpl
[WARN] [myapp] - For the following type(s), generated source was never committed (did you forget to call commit()?)
[WARN] [myapp] - nope.gwt.client.uibinder.SearchPanel_SearchPanelUiBinderImpl
[ERROR] [myapp] - Unable to load module entry point class nope.gwt.client.myapp (see associated exception for details)
[ERROR] [myapp] - Failed to load module 'myapp' from user agent 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/31.0.1650.48 Safari/537.36' at 127.0.0.1:50211
我无法判断我是否绑定了错误或者我的CSS没有任何好处。
这是我的资源界面
public interface ITRcss extends CssResource {
String content();
String pagewrap();
String mainheader();
String mainnav();
String closemenu();
}
和我的客户端捆绑
public interface ITRResources extends ClientBundle {
public static final ITRResources INSTANCE = GWT.create(ITRResources.class);
@Source("itr.css")
public ITRcss css();
// @Source("config.xml")
// public TextResource initialConfiguration();
//
// @Source("manual.pdf")
// public DataResource ownersManual();
}