我想知道是否有一种方法可以使用水平文本垂直子菜单和垂直文本进行水平 css 菜单。我尝试过,但是在旋转第二个 ul(垂直)时,对齐会崩溃。另外我希望菜单向左流动,直到我最后一个垂直菜单.. 可以这样做吗?请帮忙。
<style>
ul {
padding: 0;
margin: 0;
list-style: none;
}
#table-header {
float: left;
width: 8%;
}
.vertical-list-container {
float: left;
width: 90%;
}
.vertical-list{
float: left;
width: auto;
}
.vertical-list-trans{
float: left;
border-left:1px solid green;
border-right:1px solid red;
border-top:1px solid blue;
border-bottom:1px solid black;
-webkit-transform: rotate(-90deg);
-moz-transform: rotate(-90deg);
-ms-transform: rotate(-90deg);
-o-transform: rotate(-90deg);
filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=3);
}
</style>
<div class="vertical-list-container">
<ul class="vertical-list-trans">
<li>1</li>
<li>John Doe</li>
<li>123 Address Lane</li>
</ul>
<ul class="vertical-list-trans">
<li>2</li>
<li>Jane Doe</li>
<li>456 Another Road</li>
</ul>
<ul class="vertical-list-trans">
<li>1</li>
<li>John Doe</li>
<li>123 Address Lane</li>
<li>2</li>
<li>Jane Doe</li>
<li>456 Another Road456 Another Road456 Another Road</li>
</ul>
<ul class="vertical-list-trans">
<li>2</li>
<li>Jane Doe</li>
<li>456 Another Road</li>
<li>123 Address Lane</li>
<li>2</li>
<li>Jane Doe</li>
<li>456 Another Road456 Another Road456 Another Road</li>
<li>123 Address Lane</li>
<li>2</li>
<li>Jane Doe</li>
<li>456 Another Road456 Another Road456 Another Road</li>
</ul>
</div>