第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定
已解決430363個(gè)問題,去搜搜看,總會(huì)有你想問的

重新排列移動(dòng)屏幕上的多個(gè)選擇選項(xiàng)

重新排列移動(dòng)屏幕上的多個(gè)選擇選項(xiàng)

茅侃侃 2023-07-29 15:02:11
我有 4 個(gè)選擇選項(xiàng)設(shè)置為width: 21%;這在桌面上效果很好,因?yàn)樗鼈兌际撬綄?duì)齊的,但在移動(dòng)設(shè)備上保持不變,其中 SELECT 的大小減小,保持水平對(duì)齊,并且您無法辨認(rèn)其中的文本。如何使選擇的選項(xiàng)在桌面上水平對(duì)齊,在較小的屏幕上垂直對(duì)齊(一個(gè)在另一個(gè)之上)?我可以更改width: 21%;為width: 260px;但有更好的方法嗎?function filter() {  var filter_num_package = document.getElementById("myInput").value.toUpperCase().trim();  var filter_num_nights = document.getElementById("myInput1").value.toUpperCase().trim();  var filter_num_people = document.getElementById("myInput2").value.toUpperCase().trim();  //loop through tr  $(" tbody tr").each(function() {    //get td value 0,1,2    var first_td = $(this).find("td:eq(0)").text().toUpperCase().trim()    var second_td = $(this).find("td:eq(1)").text().toUpperCase().trim()    var third_td = $(this).find("td:eq(2)").text().toUpperCase().trim()    //check if value matches    if (first_td.includes(filter_num_package) &&      second_td.includes(filter_num_nights) &&      third_td.includes(filter_num_people)) {      //display that row      $(this).css("display", "");    } else {      //hide that row      $(this).css("display", "none");    }  })}function filter1() {  //get value of last select  var values = document.getElementById("myInput3").value.toUpperCase().trim();  //check if value is not both or first option  if (values != "BOTH" && values != "") {    //hide all td which are greater then 4    $("tr").find("td:gt(4)").hide()    //loop through second tr > th    $("table tr:eq(1) th ").each(function() {      //check if the text is equal to selct value      if ($(this).text().toUpperCase().trim() === values) {        //show that th        $(this).show();        //get class 21,22..etc        var class_to_hide = $(this).attr('class');        //check th has value 21,22..etc remove colspan        $("tr").find("th:contains(" + class_to_hide + ")").attr("colspan", "")        //check td which has select option        $("tr td[data-column*=" + $(this).text() + "]").show()      } else {        //hide the th        $(this).hide();      }    })  } 
查看完整描述

1 回答

?
長風(fēng)秋雁

TA貢獻(xiàn)1757條經(jīng)驗(yàn) 獲得超7個(gè)贊

你已經(jīng)快到了,因?yàn)槟愕?jsfiddle 示例中已經(jīng)有了一個(gè) @media 查詢。您可以覆蓋輸入的寬度,以使它們?cè)谳^小的屏幕上為全寬。


嘗試將類似的內(nèi)容添加到 @media 查詢的底部:


@media only screen and (max-width: 760px), 

(min-device-width: 768px) and (max-device-width: 1024px) {

   

    /* add the following below the other styles in the media query: */

    #myInput,

    #myInput1,

    #myInput2,

    #myInput3 {

        width: 100%; /* make the input full width */

        margin-bottom: 5px; /* optional: add some spacing between the vertical inputs */

    }


}


查看完整回答
反對(duì) 回復(fù) 2023-07-29
  • 1 回答
  • 0 關(guān)注
  • 150 瀏覽
慕課專欄
更多

添加回答

舉報(bào)

0/150
提交
取消
微信客服

購課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)