0
항목 위로 마우스를 가져 가면 아래 그림과 같은 탐색 메뉴를 만들려고합니다. 지금 상자는 흰색으로 절반 밖에 채워지지 않지만 전체를 li
으로 채우고 싶습니다. 나는호버의 배경색 변경
Image http://oi63.tinypic.com/2wp2jix.jpg
CSS
.lefttabs {
background-color: #1E1E1E;
color: white;
font-family: calibri;
font-weight: bold;
font-size: medium;
width: 300px;
height: 100%;
z-index: 1; /* Stay on top */
padding-top: 60px;
/* Place content 60px from the top */
transition: 0.5s; /* 0.5 second transition effect to slide in the sidenav */
}
.lefttabs a {
font-size: 25px;
color: #818181;
display: block;
transition: 0.3s;
font-size: medium;
color: white;
width: 133px;
margin-left: 0;
padding: 8px;
text-decoration: none;
line-height: 24px;
}
.lefttabs ul {
list-style: none;
margin: 0 20px 0 0;
border: 1px solid;
}
.lefttabs li {
list-style: none;
}
.lefttabs li a {
list-style: none;
display: block;
padding: 0 0 30px 0;
padding-left: 10px;
padding-top: 10px;
}
.lefttabs a:hover {
background-color: white;
color: black;
}
.imga {
width: 40px;
height: 30px;
margin-left: -21px;
margin-right: 20px;
}
.lefttabs a imga {
margin: 0 8px 0 0;
vertical-align: middle; /* needed */
}
HTML
<div class="lefttabs">
<ul>
<li>
<a href=""><img class="imga" alt="dashboard" src="images/eve.bmp" border="0" />DASHBOARD</a>
</li>
<li>
<a href=""><img class="imga" alt="Events" src="images/eve.bmp" border="0" />EVENTS</a>
</li>
<li>
<a href=""><img class="imga" alt="Vehicles" src="images/ve.bmp" border="0" />VEHICLES</a>
</li>
</ul>
</div>