我只是想將一些下拉菜單復(fù)制到我的其他網(wǎng)站。但似乎我做錯(cuò)了什么,所以我所有的下拉項(xiàng)目旁邊都有一些空白。(如圖) 下拉項(xiàng)旁邊的空白但在我開(kāi)發(fā)的第一個(gè)站點(diǎn)的代碼中,這個(gè)問(wèn)題并不存在!(示例) 源代碼下拉項(xiàng)示例實(shí)際上,我混合了引導(dǎo)程序和物化來(lái)形成代碼(我知道這是一個(gè)壞主意,但它上次對(duì)我有用)。我只是不知道該怎么做,才能消除差距!這是我的代碼的一部分:`<head> <meta name="viewport" content="width=device-width, initial-scale=1"> <link href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous"> <!--Import materialize.css--> <link type="text/css" rel="stylesheet" href="{% static 'petrobavar/css/materialize.min.css' %} " media="screen,projection"/> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script></head><nav class="mb-3"> <div class="nav-wrapper blue-grey darken-1 amber-text darken-text-5" style="font-family: IRANSansWeb"> <a href="#" data-target="mobile-demo" class="right sidenav-trigger"><i class="material-icons">menu</i></a> <a href="{% url 'petrobavar:home' %}" class="left hide-on-large-only"><img src="{% static 'petrobavar/petrologo.png' %}" style="width: 5rem"></a> <ul id="nav-mobile" class="right hide-on-med-and-down"> <li class="tab dropdown-trigger " data-target="dropdown6" style="text-shadow: 0 2px 5px rgba(0,0,0,.5);"><a href="#">?????? ?? ??</a></li></ul><ul id="dropdown6" class="dropdown-content center-align" style="font-family: IRANSansWeb"> <li><a href="{% url 'petrobavar:contact' %}" class="center-align">???? ? ???? ??? ????</a></li></ul><style>/* Dropdown list color */.dropdown-content li > a, .dropdown-content li > span { background-color: #546e7a; margin: 0; border: 0; width: 100% !important;}</style>
刪除下拉菜單旁邊的空白
幕布斯7119047
2023-09-18 16:04:43