对南科wiki有疑问?欢迎加入南科wiki的QQ群:301515560
“模板:Navbox”的版本间的差异
来自南科wiki
(未显示同一用户的1个中间版本) | |||
第2行: | 第2行: | ||
<div class="mw-collapsible" style="border:solid 1px #a2a9af;padding:1px;"> | <div class="mw-collapsible" style="border:solid 1px #a2a9af;padding:1px;"> | ||
<div id="title"> | <div id="title"> | ||
− | <div>'''{{{title}}}'''</div> | + | <div>'''{{{title|}}}'''</div> |
</div> | </div> | ||
<div class="mw-collapsible-content"> | <div class="mw-collapsible-content"> | ||
− | <div id="nav_above">{{{above}}}</div> | + | <div id="nav_above">{{{above|}}}</div> |
<div id="nav_main" class="inline"> | <div id="nav_main" class="inline"> | ||
− | {{{table}}} | + | {{{table|}}} |
</div> | </div> | ||
− | <div id="nav_below">{{{below}}}</div> | + | <div id="nav_below">{{{below|}}}</div> |
</div> | </div> | ||
</div><noinclude>{{文档}}</noinclude> | </div><noinclude>{{文档}}</noinclude> | ||
+ | |||
+ | <html> | ||
+ | <style> | ||
+ | #title{ | ||
+ | background:rgb(204, 204, 255); | ||
+ | margin:1px; | ||
+ | padding:2px; | ||
+ | text-align:center; | ||
+ | } | ||
+ | #nav_above{ | ||
+ | background:rgb(221, 221, 255); | ||
+ | text-align:center; | ||
+ | margin:1px; | ||
+ | padding:2px; | ||
+ | } | ||
+ | #nav_below{ | ||
+ | background:rgb(221, 221, 255); | ||
+ | text-align:center; | ||
+ | margin:1px; | ||
+ | padding:2px; | ||
+ | } | ||
+ | #center_title{ | ||
+ | text-align:center; | ||
+ | } | ||
+ | .inline li{ | ||
+ | display:inline; | ||
+ | |||
+ | } | ||
+ | .inline li:first-child:before{ | ||
+ | content:""; | ||
+ | } | ||
+ | .inline li:before { | ||
+ | content: "· "; | ||
+ | font-weight: bold; | ||
+ | } | ||
+ | .inline tbody tr:nth-child(odd) { | ||
+ | background-color: rgb(247, 247, 247); | ||
+ | } | ||
+ | .inline tbody tr:nth-child(even) { | ||
+ | background-color: rgb(253, 253, 253); | ||
+ | } | ||
+ | .inline table{ | ||
+ | width:100%; | ||
+ | border:none; | ||
+ | margin-left:1px; | ||
+ | margin-right:1px; | ||
+ | margin-top:0px; | ||
+ | margin-bottom:0px; | ||
+ | } | ||
+ | .inline tbody{ | ||
+ | border:none; | ||
+ | } | ||
+ | .inline td:first-child{ | ||
+ | background:rgb(221, 221, 255); | ||
+ | margin:1px; | ||
+ | padding-left:2px; | ||
+ | padding-right:0.5em; | ||
+ | padding-top:2px; | ||
+ | padding-bottom:2px; border:solid 1px white; | ||
+ | text-align:right; | ||
+ | } | ||
+ | .inline td:nth-child(even){ | ||
+ | margin:1px; | ||
+ | padding-left:0.4em; | ||
+ | padding-right:0.4em; | ||
+ | padding-top:2px; | ||
+ | padding-bottom:2px; | ||
+ | border:solid 1px white; | ||
+ | text-align:left; | ||
+ | } | ||
+ | .inline{ | ||
+ | display:inline; | ||
+ | } | ||
+ | @media only screen and (max-width: 600px){ | ||
+ | .inline td:first-child{width:25%;} | ||
+ | .inline td:nth-child(even){width:75%;} | ||
+ | } | ||
+ | @media only screen and (min-width: 601px){ | ||
+ | .inline td:first-child{width:10%;} | ||
+ | .inline td:nth-child(even){width:90%;} | ||
+ | } | ||
+ | </style> | ||
+ | </html> |