Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个 GWT 应用程序,它有时会从服务器获取一个表示 CSS 文件内容的字符串。是否可以使用 GWT 将此“CSS”字符串应用于应用程序?
尝试这样的事情:
Element head = Document.get().getElementsByTagName("head").getItem(0); StyleElement style = Document.get().createStyleElement(); style.setType("text/css"); style.setInnerHTML("your css goes here"); head.appendChild(style);