2016-08-14 2 views
0

제대로 된 장소에 모든 것이 나타납니다.스마트 폰에서 부트 스트랩 Navbar가 접히지 않습니다.

머리 부분.

<title>My Title for Webpage</title> 

<link href="css/bootstrap.min.css" rel="stylesheet" /> 

오른쪽 닫는 태그 다음

<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script> 
    <script src="js/bootstrap.min.js"></script> 
</body> 

위 뷰포트 메타 태그 (나는 시도했지만 운)는 네비게이션 바의 HTML 여기

<div class="navbar navbar-default navbar-fixed-top" style="border: 1px solid red; 
    padding-left: 20px; padding-right: 30px;"> 
    <div class="navbar-header"> 
     <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse"> 
      <span class="sr-only">Toggle navigation</span> <span class="icon-bar"></span><span 
       class="icon-bar"></span><span class="icon-bar"></span> 
     </button> 
     <a class="navbar-brand" href="#"><span class="title">Portland Dancing</span></a> 
    </div> 
    <div class="navbar-collapse collapse" style="max-height: 100%;"> 
     <ul class="nav navbar-nav navbar-left"> 
      <li> 
       <asp:DropDownList ID="ddlChoose" runat="server" AutoPostBack="true" CssClass="form-control" 
        EnableViewState="false" DataTextField="DanceStyle" DataValueField="DanceStyle"> 
       </asp:DropDownList> 
      </li> 
      <li> 
       <asp:DropDownList ID="ddlChooseDateRanges" runat="Server" AutoPostBack="true" CssClass="form-control" 
        OnSelectedIndexChanged="DateRangePullDownHandler" EnableViewState="false"> 
        <asp:ListItem Value="All Days">All Days</asp:ListItem> 
        <asp:ListItem Value="Christmas">Christmas</asp:ListItem> 
        <asp:ListItem Value="New Years Eve">New Year's Eve</asp:ListItem> 
        <asp:ListItem Value="Today">Today</asp:ListItem> 
        <asp:ListItem Value="Tomorrow">Tomorrow</asp:ListItem> 
        <asp:ListItem Value="Today Tomorrow">Today Tomorrow</asp:ListItem> 
        <asp:ListItem Value="This Weekend">This Weekend</asp:ListItem> 
        <asp:ListItem Value="Next Weekend">Next Weekend</asp:ListItem> 
        <asp:ListItem Value="This Week">This Week</asp:ListItem> 
        <asp:ListItem Value="Fridays">Fridays</asp:ListItem> 
        <asp:ListItem Value="Saturdays">Saturdays</asp:ListItem> 
        <asp:ListItem Value="Sundays">Sundays</asp:ListItem> 
        <asp:ListItem Value="Mondays">Mondays</asp:ListItem> 
        <asp:ListItem Value="Tuesdays">Tuesdays</asp:ListItem> 
        <asp:ListItem Value="Wednesdays">Wednesdays</asp:ListItem> 
        <asp:ListItem Value="Thursdays">Thursdays</asp:ListItem> 
        <asp:ListItem Value="Before 1pm">Before 1pm</asp:ListItem> 
        <asp:ListItem Value="Before 3pm">Before 3pm</asp:ListItem> 
        <asp:ListItem Value="Before 6pm">Before 6pm</asp:ListItem> 
        <asp:ListItem Value="Before 9pm">Before 9pm</asp:ListItem> 
       </asp:DropDownList> 
      </li> 
     </ul> 
     <ul class="nav navbar-nav navbar-right"> 
      <li> 
       <asp:LinkButton ID="lnkPrint" Style="margin-bottom: 5px; padding: 6px 0px;" CssClass="form-control" 
        CausesValidation="False" BackColor="#f6f2dc" ForeColor="Black" runat="server" 
        EnableViewState="false" title="Make your choices with the checkboxes and then Print them">Print</asp:LinkButton> 
      </li> 
      <li> 
       <asp:LinkButton ID="lnkEmail" Style="margin-bottom: 5px; padding: 6px 0px;" CssClass="form-control" 
        runat="server" CausesValidation="False" BackColor="#f6f2dc" ForeColor="Black" 
        EnableViewState="false" title="Make your choices with the checkboxes and then Email them"> 
      Email 
       </asp:LinkButton></li> 
      <li> 
       <asp:DropDownList ID="ddlAgesPrice" runat="Server" AutoPostBack="true" OnSelectedIndexChanged="AgesPricePulldownHandler" 
        CssClass="form-control" EnableViewState="false" Style="text-align: center;"> 
        <asp:ListItem Value="Ages, Price" Enabled="false">(Ages, Price)</asp:ListItem> 
        <asp:ListItem Value="All, All">All, All</asp:ListItem> 
        <asp:ListItem Value="All, Free">All, Free</asp:ListItem> 
        <asp:ListItem Value="Under 21, All">Under 21, All</asp:ListItem> 
        <asp:ListItem Value="Under 21, Free">Under 21, Free</asp:ListItem> 
        <asp:ListItem Value="Over 50, All">Over 50, All</asp:ListItem> 
        <asp:ListItem Value="Over 50, Free">Over 50, Free</asp:ListItem> 
       </asp:DropDownList> 
      </li> 
      <li> 
       <asp:CheckBox ID="chkInflate" CssClass="form-control" EnableViewState="True" AutoPostBack="True" 
        BackColor="#f6f2dc" ForeColor="Black" Style="margin-bottom: 5px;" runat="Server" 
        ToolTip="Check/Uncheck the box to have all the names expand with more info on this web page. Or go over and click on an event name to pop up a whole bunch of information."> 
       </asp:CheckBox></li> 
      <li> 
      <a href="emailus.aspx" class="form-control" style="color: black; background-color: #f6f2dc; margin-bottom: 7px; font-size: 14px; padding: 6px 0px;" target="_blank" title="Do you have a dance to list? Problem with a listing? Advice for us? Click here to email us. Classes and workshops are in a different area: Learn Stuff"> 
       Contact</a> 
      </li> 
      <li> 
      <a href="learn.aspx" target="_blank" class="form-control" style="font-weight: bold; 
       margin-bottom: 7px; color: Red; background-color: #f6f2dc; font-size: 14px; padding: 6px 0px;" 
       title="You must click here to see the Lessons, Worksops, and Gatherings, Private Lessons."> 
       Lessons</a> 
      </li> 
     </ul> 
    </div> 
</div> 

에게 없다 Chrome 개발자 도구를 사용하여 iphone 5에서 보이는 모습입니다. 내 iphone6plus에서도 마찬가지입니다. 그것은 붕괴 오른쪽에있는 토글 버튼을 표시한다 : 여기

Navbar collapsed to iphone5 size

는 Chrome 개발자 도구를 사용하여 일반 브라우저 크기 (노트북)입니다. 설계대로 : 어떤 재미와 나를 혼란이 것은 나타나 작품 나는 창 토글 버튼의 ​​오른쪽에 끌어 내 크롬 브라우저 창을 축소 할 수 있다는 것입니다

Regular/Laptop browser size

. 그것은 내가 옳은 일을하고 있음을 보여줍니다. . . 내 iPhone6plus

Window shrink navbar

에 시도하고 나 또한 내 리튬 태그를 붕괴하고 더 나은 것을 볼위한 노력의 일환으로 스크린 인쇄했다 때까지

enter image description here

+0

뷰포트를 설정해보십시오 설계되었습니다 것을 : '<메타 이름 = "뷰포트"내용 = "폭 = device-width, 초기 크기 = 1.0 "/>'. – Karin

+0

제공하신 스 니펫과 함께 전체 소스 코드를 게시하시면 문제를 찾기가 상당히 어려워 질 것입니다. – Derek

+0

@ 카린 당신 말이 맞아요! 이봐 요, 전 viewoport에 문제가있었습니다. 이 질문을 편집하는 동안 당신은 대답했습니다. 빠른 남자. 그것이 뱀이라면 그것은 나에게 작은 조각을 가지고있을 것이다. 하나. . . . 스마트 폰에 업로드하고 열어야합니다. 내 전화에서 작동하는 경우이를 받아 들일 수 있도록이 대답을하십시오. 고마워요 – JustJohn

답변

0

내가 당신을 생각을 놓치지 마세요 <meta name="viewport" content="width=device-width, initial-scale=1">


 
<meta name="viewport" content="width=device-width, initial-scale=1"> 
 
<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"> 
 
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script> 
 
    <script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script> 
 

 
<div class="navbar navbar-default navbar-fixed-top" style="border: 1px solid red; 
 
    padding-left: 20px; padding-right: 30px;"> 
 
    <div class="navbar-header"> 
 
     <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse"> 
 
      <span class="sr-only">Toggle navigation</span> <span class="icon-bar"></span><span 
 
       class="icon-bar"></span><span class="icon-bar"></span> 
 
     </button> 
 
     <a class="navbar-brand" href="#"><span class="title">Portland Dancing</span></a> 
 
    </div> 
 
    <div class="navbar-collapse collapse" style="max-height: 100%;"> 
 
     <ul class="nav navbar-nav navbar-left"> 
 
      <li> 
 
       <asp:DropDownList ID="ddlChoose" runat="server" AutoPostBack="true" CssClass="form-control" 
 
        EnableViewState="false" DataTextField="DanceStyle" DataValueField="DanceStyle"> 
 
       </asp:DropDownList> 
 
      </li> 
 
      <li> 
 
       <asp:DropDownList ID="ddlChooseDateRanges" runat="Server" AutoPostBack="true" CssClass="form-control" 
 
        OnSelectedIndexChanged="DateRangePullDownHandler" EnableViewState="false"> 
 
        <asp:ListItem Value="All Days">All Days</asp:ListItem> 
 
        <asp:ListItem Value="Christmas">Christmas</asp:ListItem> 
 
        <asp:ListItem Value="New Years Eve">New Year's Eve</asp:ListItem> 
 
        <asp:ListItem Value="Today">Today</asp:ListItem> 
 
        <asp:ListItem Value="Tomorrow">Tomorrow</asp:ListItem> 
 
        <asp:ListItem Value="Today Tomorrow">Today Tomorrow</asp:ListItem> 
 
        <asp:ListItem Value="This Weekend">This Weekend</asp:ListItem> 
 
        <asp:ListItem Value="Next Weekend">Next Weekend</asp:ListItem> 
 
        <asp:ListItem Value="This Week">This Week</asp:ListItem> 
 
        <asp:ListItem Value="Fridays">Fridays</asp:ListItem> 
 
        <asp:ListItem Value="Saturdays">Saturdays</asp:ListItem> 
 
        <asp:ListItem Value="Sundays">Sundays</asp:ListItem> 
 
        <asp:ListItem Value="Mondays">Mondays</asp:ListItem> 
 
        <asp:ListItem Value="Tuesdays">Tuesdays</asp:ListItem> 
 
        <asp:ListItem Value="Wednesdays">Wednesdays</asp:ListItem> 
 
        <asp:ListItem Value="Thursdays">Thursdays</asp:ListItem> 
 
        <asp:ListItem Value="Before 1pm">Before 1pm</asp:ListItem> 
 
        <asp:ListItem Value="Before 3pm">Before 3pm</asp:ListItem> 
 
        <asp:ListItem Value="Before 6pm">Before 6pm</asp:ListItem> 
 
        <asp:ListItem Value="Before 9pm">Before 9pm</asp:ListItem> 
 
       </asp:DropDownList> 
 
      </li> 
 
     </ul> 
 
     <ul class="nav navbar-nav navbar-right"> 
 
      <li> 
 
       <asp:LinkButton ID="lnkPrint" Style="margin-bottom: 5px; padding: 6px 0px;" CssClass="form-control" 
 
        CausesValidation="False" BackColor="#f6f2dc" ForeColor="Black" runat="server" 
 
        EnableViewState="false" title="Make your choices with the checkboxes and then Print them">Print</asp:LinkButton> 
 
      </li> 
 
      <li> 
 
       <asp:LinkButton ID="lnkEmail" Style="margin-bottom: 5px; padding: 6px 0px;" CssClass="form-control" 
 
        runat="server" CausesValidation="False" BackColor="#f6f2dc" ForeColor="Black" 
 
        EnableViewState="false" title="Make your choices with the checkboxes and then Email them"> 
 
      Email 
 
       </asp:LinkButton></li> 
 
      <li> 
 
       <asp:DropDownList ID="ddlAgesPrice" runat="Server" AutoPostBack="true" OnSelectedIndexChanged="AgesPricePulldownHandler" 
 
        CssClass="form-control" EnableViewState="false" Style="text-align: center;"> 
 
        <asp:ListItem Value="Ages, Price" Enabled="false">(Ages, Price)</asp:ListItem> 
 
        <asp:ListItem Value="All, All">All, All</asp:ListItem> 
 
        <asp:ListItem Value="All, Free">All, Free</asp:ListItem> 
 
        <asp:ListItem Value="Under 21, All">Under 21, All</asp:ListItem> 
 
        <asp:ListItem Value="Under 21, Free">Under 21, Free</asp:ListItem> 
 
        <asp:ListItem Value="Over 50, All">Over 50, All</asp:ListItem> 
 
        <asp:ListItem Value="Over 50, Free">Over 50, Free</asp:ListItem> 
 
       </asp:DropDownList> 
 
      </li> 
 
      <li> 
 
       <asp:CheckBox ID="chkInflate" CssClass="form-control" EnableViewState="True" AutoPostBack="True" 
 
        BackColor="#f6f2dc" ForeColor="Black" Style="margin-bottom: 5px;" runat="Server" 
 
        ToolTip="Check/Uncheck the box to have all the names expand with more info on this web page. Or go over and click on an event name to pop up a whole bunch of information."> 
 
       </asp:CheckBox></li> 
 
      <li> 
 
      <a href="emailus.aspx" class="form-control" style="color: black; background-color: #f6f2dc; margin-bottom: 7px; font-size: 14px; padding: 6px 0px;" target="_blank" title="Do you have a dance to list? Problem with a listing? Advice for us? Click here to email us. Classes and workshops are in a different area: Learn Stuff"> 
 
       Contact</a> 
 
      </li> 
 
      <li> 
 
      <a href="learn.aspx" target="_blank" class="form-control" style="font-weight: bold; 
 
       margin-bottom: 7px; color: Red; background-color: #f6f2dc; font-size: 14px; padding: 6px 0px;" 
 
       title="You must click here to see the Lessons, Worksops, and Gatherings, Private Lessons."> 
 
       Lessons</a> 
 
      </li> 
 
     </ul> 
 
    </div> 
 
</div>
섹션 <meta name="viewport" content="width=device-width, initial-scale=1.0">를 추가 3,516,내 댓글에서 언급 한 바와 같이

+0

원본 게시물 * "머리 부분에 뷰포트 메타 태그 없음 (시도했지만 행운 없음)"* – Derek

+0

@Head Cloud에서 나는 뷰포트에 관한 의견을 추가하는 질문을 편집하는 동안 이것을 대답했습니다. 나를. 이렇게 빠른 응답에 감사 드리며 저를 포기하지 마십시오. – JustJohn

2

, 당신의 문제를 해결해야한다. 당신은 뷰포트 here에 대한 자세한 내용을보실 수 있습니다,하지만 테이크 아웃은 다음과 같습니다

폭은 = 장치 폭 부분은 장치에 따라 달라집니다 장치의 화면 폭을 (따라 페이지의 폭을 설정).

브라우저가 페이지를 처음로드 할 때 initial-scale = 1.0 부분은 초기 확대/축소 수준을 설정합니다.

그래서,이 휴대 전화가 당신의 웹 페이지를 뭉개 버려하지 알 수 있습니다 그것을 염두에 모바일 스케일링 :

+0

나는 일을 얻으려고이 긴 2 일 동안 모든 설명에 부딪쳤다. Google 및 스택 오버플로 감사합니다. 나는 그것이 내 수축 된 화면의 몸 부분을 엉망으로 만들고 있다고 생각하고 그것은 다른 침대 시간에 대한 또 다른 이야기이다. 한 번에 작은 단계. 감사합니다. 카린. . .. 옛날 asp.net webforms 웹 사이트를 반응 적으로 만들려고 힘든 일입니다. 악마가 세부 사항에 있습니다. 나는 보편적 인 부트 스트랩 템플리트의 "마른 언더 페드 (skinny underfed)"모양으로 갈 수 있다고 생각한다. Boot Strap의 약자는 다음과 같습니다. . . . . . – JustJohn