bootstrap下拉菜单工件

时间:2017-12-21 19:42:13

标签: twitter-bootstrap

有时候 - 有时没有

<th id="DateTime" class="dropdown">
            <a href="#" class="dropdown-toggle" data-toggle="dropdown" id="DateTime">
                <span class="glyphicon glyphicon-calendar"></span>
                @Html.DisplayName("DateTime")
                <span class="caret"></span>
            </a>
            <ul class="dropdown-menu" role="menu" aria-labelledby="DateTime">
                <li><a asp-action="SortingByDate" asp-controller="Project" asp-route-sorting="@SortingEnum.Increasing">Sorting inc.</a></li>
                <li><a asp-action="SortingByDate" asp-controller="Project" asp-route-sorting="@SortingEnum.Decreasing">Sorting dec.</a></li>
                <li>
                    <a href="#" data-toggle="collapse" data-target="#filterDateTime" aria-expanded="false" aria-controls="filter" class="filterDateTime">Filter</a>
                </li>
                <li><a asp-action="HideColumn" asp-controller="Project" asp-route-column="@ProjectColumnsEnum.EntryDateTime">Hide column</a></li>
            </ul>

所以看起来应该是这样的: picture

所以看起来实际上(基本上在ctrl-f5之后): picture

<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title> - QAManagementTool</title>


    <link href="/lib/bootstrap/dist/css/bootstrap.css" rel="stylesheet">
    <link href="/lib/bootstrap-multiselect/dist/css/bootstrap-multiselect.css" rel="stylesheet">
    <link href="/lib/bootstrap-social/bootstrap-social.css" rel="stylesheet">
    <link href="/lib/eonasdan-bootstrap-datetimepicker/build/css/bootstrap-datetimepicker.css" rel="stylesheet">
    <link href="/css/site.css" rel="stylesheet">
    <link href="/lib/font-awesome/css/font-awesome.css" rel="stylesheet">

......

<script src="/lib/jquery/dist/jquery.js"></script>
<script src="/lib/bootstrap/dist/js/bootstrap.js"></script>
<script src="/lib/bootstrap-multiselect/dist/js/bootstrap-multiselect.js"></script>
<script src="/js/TestRequirementList.js"></script>

可能是什么问题?

1 个答案:

答案 0 :(得分:0)

首先你必须在`class =&#34;下拉菜单列表 - 无格式&#34;之后添加list-unstyled。这个。在这里你删除你的bullut。然后你必须为列表

包装css属性
.dropdown-menu{
 padding:0;//are margin 0
}

此处padding:0;//are margin 0 is my css code.If you wrap you own css property