h1('HTML Creation');p('Tags are functions.')p('Attributes are objects...', { style:{fontStyle:'italic'}})ul(function(){ li('Nest'); li('with'); li('functions!');});
效果:
HTML Creation
Tags are functions.
Attributes are objects...
Nest with functions!你也用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');
效果:
CSS Creation
This is red
This is big
This is both
Github地址: https://github.com/ojjs/oj/
查看更多关于不用HTML/CSS,JS就够了_html/css_WEB-ITnose的详细内容...
声明:本文来自网络,不代表【好得很程序员自学网】立场,转载请注明出处:http://www.haodehen.cn/did114845