答案 0 :(得分:2)
您可以在菜单中放置旋转的元素,并使用overflow: hidden;
隐藏元素的左侧和右侧。将菜单项放在其上的另一个元素中,这样它们也不会旋转:
.menu { position: relative; width: 200px; height: 300px; overflow: hidden; }
.menu .top { height: 50px; background: #c00; padding: 10px; }
.menu .bg { position: absolute; left:-25px; top: 50px; width: 250px; height: 200px; background: linear-gradient(to right, #f33 0%,#f00 100%); transform: rotate(-5deg); }
.menu .items { position: absolute; left: 0; top: 70px; }
.menu .items a { display: block; padding: 5px 20px; }

<div class="menu">
<div class="top">Menu</div>
<div class="bg"></div>
<div class="items">
<a href="#">Menu item</a>
<a href="#">Menu item</a>
<a href="#">Menu item</a>
<a href="#">Menu item</a>
</div>
</div>
&#13;