renderSnakeHTML生成庫
RenderSnake 是一個輕量級的Java類庫用來通過Java方法生產(chǎn)html頁面,包含4個核心類庫:
- HtmlCanvas , a class that has methods for all HTML 4.01 and HTML5 tags for opening and closing it
- HtmlAttributes, a class that has methods for all existing HTML attributes for setting an attribute value
- Renderable, a interface that is used to create component classes. Each component must implement the method renderOn(HtmlCanvas)
- PageContext, a Map-like object to store any information that is used for rendering a Page.
示例代碼:
canvas.html()
.body()
.h1().write("RenderSnake")._h1()
._body()
._html()評論
圖片
表情
