ด้วยการเพิ่ม css ข้างล่างนี้ครับ
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 |
.dropdown-menu .dropdown { position:relative; } .dropdown-menu .dropdown>.dropdown-menu { top:0;left:100%; margin-top:-6px;margin-left:-1px; -webkit-border-radius:0 6px 6px 6px;-moz-border-radius:0 6px 6px 6px;border-radius:0 6px 6px 6px; } .dropdown-menu .dropdown > a:after { border-color: transparent transparent transparent #333; border-style: solid; border-width: 5px 0 5px 5px; content: " "; display: block; float: right; height: 0; margin-right: -10px; margin-top: 5px; width: 0; } .dropdown-menu .dropdown:hover>a:after { border-left-color:#555; } /*.dropdown-menu > li > a:hover, .dropdown-menu > .active > a:hover { text-decoration: underline; }*/ @media (max-width: 767px) { .navbar-nav { display: inline; } .navbar-default .navbar-brand { display: inline; } .navbar-default .navbar-toggle .icon-bar { background-color: #fff; } .navbar-default .navbar-nav .dropdown-menu > li > a { color: red; background-color: #ccc; border-radius: 4px; margin-top: 2px; } .navbar-default .navbar-nav .open .dropdown-menu > li > a { color: #333; } .navbar-default .navbar-nav .open .dropdown-menu > li > a:hover, .navbar-default .navbar-nav .open .dropdown-menu > li > a:focus { background-color: #ccc; } .navbar-nav .open .dropdown-menu { border-bottom: 1px solid white; border-radius: 0; } .dropdown-menu { padding-left: 10px; } .dropdown-menu .dropdown-menu { padding-left: 20px; } .dropdown-menu .dropdown-menu .dropdown-menu { padding-left: 30px; } li.dropdown.open { border: 0px solid red; } } @media (min-width: 768px) { ul.nav li:hover > ul.dropdown-menu { display: block; } #navbar { text-align: center; } } |
ป้ายกำกับ:Bootstrap