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/
Copyright © 2019- ovod.cn 版权所有 湘ICP备2023023988号-4
违法及侵权请联系:TEL:199 1889 7713 E-MAIL:2724546146@qq.com
本站由北京市万商天勤律师事务所王兴未律师提供法律服务