我想爲我們的gameserver控制面板製作gameserver控制檯。 現在我有一個小樣式的問題是,每一個奇數行需要有一個稍微更亮的背景。使用CSS製作div內的跨度背景全尺寸使用CSS
代碼:
showLoading('gameTerminal_content', '32', 'html', '');
.gameTerminal_content_outputLine:nth-of-type(odd) { width:500px; background: #4C3C33; }
<div class="well-md" id="gameTerminal" style="background: #2A211C; height: 300px; max-width: 100%; overflow-y:scroll; font-family:'Courier New', Courier, monospace">
\t \t \t \t \t \t \t \t \t \t \t \t \t \t \t
<p>
\t \t \t \t \t \t \t \t \t \t \t
<span id="gameTerminal_content" style="color:#80FF80; width: 100%;">
<span class="gameTerminal_content_outputLine">Line 1</span><br /><br />
<span class="gameTerminal_content_outputLine">Line 2</span><br /><br />
<span class="gameTerminal_content_outputLine">Line 3</span><br /><br />
\t \t \t \t \t \t \t \t \t \t \t \t \t \t \t \t
</span>
</p>
\t \t \t \t \t \t \t \t \t \t \t \t \t \t \t
<!--<input type="text" name="gameTerminal_input" style="background: #4C3C33; float: left; color: #FFFFFF; width: 90%; border:none; position: absolute; bottom: 0; outline: none;" />-->
<div id="gameTerminal_scrollHeigth"></div>
</div>
正是我在找的地方,感謝實際閱讀我想要的東西:) –