2017-08-24 68 views
0

我使用的是引导仪表板由Creative Tim,并试图将一个下拉列表添加到表格单元格作为典型的自举右对齐的指针一个指针下拉列表中,这是很好又漂亮,可是左对齐:CSS在下拉

enter image description here

如何转变风格this指针,因此它是右对齐?

enter image description here

,但我无法重现它的导航面板外:在页面顶部看到下拉菜单 -

的风格确实存在这种行为。

我在这里上传有问题的网页(也有很多款式有上传到的jsfiddle): http://fredapps.s3.amazonaws.com/light-bootstrap-dashboard-pro/examples/tables/regular2.html

+0

无法访问此链接,访问被拒绝。 – Johannes

回答

0

他似乎做它his live preview的方法就是通过CSS。所以如果我是你,我会去看看那里,看看你们有什么不同。我的屏幕截图显示:before伪元素,请确保您也看到了:after

enter image description here

0

顶部导航风格将覆盖:before:afterleft值。

的默认样式是这样的:

.dropdown-menu:before { 
    border-bottom: 11px solid rgba(0, 0, 0, 0.2); 
    border-left: 11px solid transparent; 
    border-right: 11px solid transparent; 
    content: ""; 
    display: inline-block; 
    position: absolute; 
    left: 12px; 
    top: -11px; 
} 

.dropdown-menu:after { 
    border-bottom: 11px solid #FFFFFF; 
    border-left: 11px solid transparent; 
    border-right: 11px solid transparent; 
    content: ""; 
    display: inline-block; 
    position: absolute; 
    left: 12px; 
    top: -10px; 
} 

更新他们:

... { 
    left: auto; 
    right: 12px; 
}