0
我已經在剃刀/ MVC運行以下視圖MVC /剃鬚刀/ HTML相同的背景色:上垂直瓷磚窗口
<div class="body">
<div class="content-wrapper">
<div class="treewindow">
<div class="treewindowtitle">
TREEWVIEW TITLE
</div>
<div class="treewindowcontent">
<div id="EquipmentTree">
<ul>
<li><a>Equip Class1</a>
<ul>
<li><a>Equip1.1</a>
<ul>
<li><a>Equip1.2</a></li>
<li><a>Equip1.3</a></li>
</ul>
</li>
<li><a>Equip Class2</a>
<ul>
<li><a>Equip2.1</a></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
</div>
<p>Left Text 1</p>
<p>Left Text 2</p>
<p>Left Text 3</p>
</div>
</div>
的想法是有爲了左定位樹視圖控制導航和上主屏幕右側將根據樹形視圖選擇出現的數據。這段代碼是這樣完成的,因爲有些數據是被加載的(所有邏輯被刪除以隔離我所遇到的問題)。
I'm使用下面的.css文件:
html
{
background-color: #e2e2e2;
margin: 0;
padding: 0;
}
body
{
background-color: #fff;
font-size: .85em;
border-top: solid 5px #000;
font-family: 'Segoe UI' , Tahoma, Geneva, Verdana, Helvetica, sans-serif;
font-size: small;
font-weight: normal;
font-style: normal;
font-variant: normal;
color: #000066;
margin: 0;
padding : 0;
}
a {
color: #000066;
outline: none;
padding-left: 3px;
padding-right: 3px;
text-decoration: underline;
}
.float-left {
float: left;
}
.float-right {
float: right;
}
/* main layout
----------------------------------------------------------*/
.content-wrapper {
margin: 0 auto;
max-width: 960px;
}
.body {
background-color: #efeeef;
clear: both;
padding-bottom: 35px;
}
/* Treeview control
----------------------------------------------------------*/
.treewindow
{
float: left;
width: 200px;
color: #495677;
background-color: #efeeef;
}
.treewindowtitle
{
color: #fff;
background-color: #495677;
text-align: center;
font-size: smaller;
}
.treewindowcontent
{
width: 200px;
height: 400px;
overflow-y: scroll;
overflow-x: scroll;
color: #495677;
background-color: #efeeef;
}
我的問題是要保持相同的背景顏色在兩個屏幕上。發生這種情況時,窗口在左側打開時會破壞屏幕背景的右側。你可以在這裏看到Fiddle:我希望雙方都有相同的背景顏色。
希望有人可以幫助我...
謝謝。