【发布时间】:2014-07-31 20:25:33
【问题描述】:
我需要在窗口右侧与标题+按钮在同一行中制作颜色图例。现在它看起来像这样:
<ul class="legend">
<li><span class="superawesome"></span> Super Awesome</li>
<li><span class="awesome"></span> Awesome</li>
<li><span class="kindaawesome"></span> Kinda Awesome</li>
<li><span class="notawesome"></span> Not Awesome</li>
</ul>
<div style="text-align: center">
<label ID="contentTitle">TITLE</label>
</div>
<div style="text-align: center">
<button ID="contentButton">button</button>
</div>
.legend { list-style: none; }
.legend span { border: 1px solid #ccc; float: left; width: 12px; height: 12px; margin: 2px; }
.legend .superawesome { background-color: #ff00ff; }
.legend .awesome { background-color: #00ffff; }
.legend .kindaawesome { background-color: #0000ff; }
.legend .notawesome { background-color: #000000; }
如您所见,颜色在单词的右侧,我需要它们在左侧。
【问题讨论】:
标签: html css button user-interface label