return page history
α-wwwiki
::
history/y/20130606-190937.txt
editor : alpha [83.159.125.165] 2013/06/06 19:09:37 _h1 a custom style "y" or "z" _h3 1) using [[define]] {define y () °° var args = [].slice.call(arguments).join( ' ' ); var style= "font:normal 0.8em arial;" +"background:#888;" +"color:#fff;" +"text-align:center;" +"margin:20px 50px 0 50px;" +"padding:0 20px;" +"border:1px solid;" +"box-shadow:0px 0px 2px black;" +"-webkit-border-radius:10px;" +"-moz-border-radius:10px;" +"border-radius:10px;"; return '{div {@ style="' + style + '"}' + args + '}'; °°} {y a custom {u cute} tag} _h3 code {pre °° {define y () •• var args = [].slice.call(arguments).join( ' ' ); var style= "font:normal 0.8em arial;" +"background:#888;" +"color:#fff;" +"text-align:center;" +"margin:20px 50px 0 50px;" +"padding:0 20px;" +"border:1px solid;" +"box-shadow:0px 0px 2px black;" +"-webkit-border-radius:10px;" +"-moz-border-radius:10px;" +"border-radius:10px;"; return '{div {@ style="' + style + '"}' + args + '}'; ••} {y a custom {u cute} tag} °°} _h3 2) using [[defun]] function {defun z () °°div {@ style=" font:normal 0.8em arial; background:#888; color:#fff; text-align:center; margin:20px 50px 0 50px; padding:0 20px; border:1px solid; box-shadow:0px 0px 2px black; -webkit-border-radius:10px; -moz-border-radius:10px; border-radius:10px; "}°°} OK {{z} a custom {u cute} tag} _p Note : the two characters " •• " are actually two characters degree " {sup o}{sup o} " ! _h3 code {pre °° {defun z () ••div {@ style=" font:normal 0.8em arial; background:#888; color:#fff; text-align:center; margin:20px 50px 0 50px; padding:0 20px; border:1px solid; box-shadow:0px 0px 2px black; -webkit-border-radius:10px; -moz-border-radius:10px; border-radius:10px; "}••} {{z} a custom {u cute} tag} °°} _h3 3) and ? _p Using define is difficult to code and easy to use, using defun is easy to code and a little more complex to use. The first one should be integrated in the core functions. The last may be useful occasionally. A question of context