I am looking at this example of a only css generated drop down menu:
我想知道如何让“关于我们”标签下的项目从右到左对齐。现在他们看起来像这样:
About us
|Menu items with different length|
我希望它看起来像那样:
About us
|Menu items with different length|
答案 0 :(得分:6)
答案 1 :(得分:3)
只需将right:0;
添加到li:hover ul
或li ul
li:hover ul {
display: block;
position: absolute;
right:0;
}
答案 2 :(得分:0)
在你的css风格中使用float:right
。
li ul {
display: none;
position:absolute;
float:right;
}