时间:2021-07-01 10:21:17 帮助过:7人阅读
h1('HTML Creation');p('Tags are functions.')p('Attributes are objects...', { style:{fontStyle:'italic'}})ul(function(){ li('Nest'); li('with'); li('functions!');});
效果:
Tags are functions.
Attributes are objects...
你也用JS来设置些CSS
h1('CSS Creation')css({ '.red':{color:'#e00'}, '.big':{fontSize:'25px'}});div({'class':'red'}, 'This is red');div({c:'big'}, 'This is big');div({c:'big red'}, 'This is both');
效果:
This is red
This is big
This is both
Github地址: https://github.com/ojjs/oj/