플렉스박스져 이외의 컨테이너도를 표시하도록 설정:flex;에 특정 화면 너비

0

질문

나왔을 만들려고 하면 네비게이션 바다 모두가 잘 제외하고 하나의 문제 때 나타나는 창의 폭은 사 768px 및 922px 으로 내용 내부 nav 요소는 외부의 그것의 컨테이너에서 오른쪽.많은 해결책이 있을 수도 있겠지만,그들 중 아무도 일했고,내가 알지도 못하는 원인의 문제입니다.

<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>test Website</title>
    <!-- font awesome -->
    <script src="https://kit.fontawesome.com/3e0066cf06.js" crossorigin="anonymous"></script>
    <!-- font awesome -->
    <link rel="stylesheet" href="normalize.css">
    <link rel="stylesheet" href="style.css">

</head>

<body>
    <section class="first">

        <div class="container">
            <h1>Test Website</h1>
            <nav>
                <i class="fas fa-bars fa-3x  menu"></i>
                <ul>
                    <li><a href="" class="active">Home</a></li>
                    <li><a href="">Services</a></li>
                    <li><a href="">Contact</a></li>
                    <li><a href="">Help</a></li>
                </ul>
                <div class="search">
                    <i class="fas fa-search fa-3x"></i>
                </div>
            </nav>
        </div>
        <div class="slider">
            <div class="content-text">
                <h2> Who are we?</h2>
                <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. <br>
                    Lorem ipsum dolor sit amet consectetur adipisicing elit. </p>
            </div>

        </div>
    </section>


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

    <script src="index.js"></script>

</body>

</html>

    @import url('https://fonts.googl-3eapis.com/css2?family=Montserrat:wght@300;400;700&display=swap');
    *{
        padding: 0%;
        margin: 0%;
        box-sizing: border-box;
    }
    html{
        font-family: Montserrat;
        font-size: 10px;
        scroll-behavior: smooth;
    }
    ul{
        list-style: none;
        
    }
    
    /* global frameWork */
    
    .container {
        padding-left: 15px;
        padding-right: 15px;
        margin-inline: auto;
        position: relative;
        min-height: 115.59px;
      }
      /* Small */
      @media (min-width: 768px) {
        .container {
          width: 750px;
        }
      }
     
    
      /* Medium */
      @media (min-width: 992px) {
        .container {
          width: 970px;
        }
      }
      /* Large */
      @media (min-width: 1200px) {
        .container {
          min-width: 1170px;
        }
      }
      /* End Global Rules */
      /* Start Components */
    
      @media (max-width: 767px) {
     
      }
    
    .first{
      min-height: 100vh;
      position: absolute;
      min-width: 100%;
      
    }
    .first::after{
      content: "";
      position: absolute;
      min-height: 100vh;
      width: 100%;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      background-image: linear-gradient(rgba(0,0,0,.3),rgba(0,0,0,.5)),url(images/evgeni-tcherkasski-SHA85I0G8K4-unsplash.jpg);
      background-position: center;
      background-size: cover;
      background-repeat: no-repeat;
      z-index: -1;
    }
    
    .container{
      display: flex;
      justify-content: space-between;
      align-items: center;
      color: white;
      /* position: relative; */
    }
    
    nav{
      flex: 1;
      display: flex;
      justify-content: flex-end;
      align-items: center;
      position: relative;
    }
    
    .container::after{ 
      content: "";
      position: absolute;
      width: calc(100% - 30px);
      height: 5px;
      background-color: white;
      left: 15px;
      right: 15px;
      bottom:14px;
    
    }
    
    nav ul{
    
      display: flex;
    
    
    }
    
    nav ul li a{
      display: block;
      color: white;
      text-decoration: none;
      font-size: 2rem;
      padding: 30px 40px;
      transition: all .2 ease-in-out;
      position: relative;
      z-index: 2;
    }
    
    nav .search{
      color: white;
      width: 50px;
      height: 70px;
      margin-left: 30px;
      position: relative;
      border-left: 3px solid white;
    }
    
    nav .search i{
      position: absolute;
      top: 50%;
      transform: translateY(-50%);
      right: 0;
    }
    
    nav ul li a.active,
    nav ul li :hover{
      color: #19c8fa;
      border-bottom: 5px solid #19c8fa;
     
      
    }
    
    /* <.........ressponsive Navbar........>>>>>>> */
    @media (min-width: 767px) {
      nav .menu{
        display: none;
      }
      
    }
    @media (max-width: 768px) {
      nav ul{
        display: none;
      }
    
      nav ul.clicked{
        display: flex;
        flex-direction: column;
        position: fixed;
        width: 100%;
        top: 20%;
        left: 0;
        background-color: rgba(0,0,0,.3);
      }
    
     
      
    }
    
    .slider{
      display: flex;
      flex-direction: row;
      justify-content: flex-end;
      color: white;
      position: absolute;
      top: 50%;
      transform: translateY(-50%);
      background-color:#19c8fa ;
      height: 250px;
      width: 600px;
     
     
      
      
    }
    
    .content-text{
      
      position: absolute;
      top: 50%;
      transform: translateY(-50%);
      left: 50px;
    
      
    }
    
    .content-text h2{
      font-size: 3rem;
      font-weight: bold;
      margin-bottom:5px ;
    
    }
    .content-text p{
      font-size: 1.5rem;
      line-height: 20px;
      text-transform: uppercase;
    }
    
    
    
    /* <.........ressponsive Navbar........>>>>>>> */

css flexbox html javascript
2021-11-24 00:40:42
2
0

을 시도했다 플렉스-wrap:wrap?

2021-11-24 02:57:01

당신의 답을 개선할 수 있는 추가 지원하는 정보입니다. 십시오 편집 을 더 추가 정보와 같은 인용 또는 문서,그래서 다른 사람을 확인할 수 있는 것입니다. 을 찾을 수 있습하는 방법에 대한 자세한 정보를 쓰기 좋은 도움말 센터에서.
Community

감사할 수 있습니다. 나는 해결책을 발견하고 그것은 패딩의<a>태그 안에<ul>요소로 그것을 했는데 크기를 줄일 수 있습니다.
Ahmed Abd Alfttah
0

나는 해결책을 발견하고 그것은 패딩의 태그 내부의 요소로 그것을 했는데 크기를 줄일 수 있습니다.

2021-11-24 23:44:33

으로의 현재 기록,당신의 대답은 불분명합니다. 십시오 편집 을 추가 정보는 다른 사람들이 이해하도록 돕기 위해 어떻게 이 문제를 해결이 물었다. 을 찾을 수 있습하는 방법에 대한 자세한 정보를 쓰기 좋은 도움말 센터에서.
Community

다른 언어로

이 페이지는 다른 언어로되어 있습니다

Русский
..................................................................................................................
Italiano
..................................................................................................................
Polski
..................................................................................................................
Română
..................................................................................................................
हिन्दी
..................................................................................................................
Français
..................................................................................................................
Türk
..................................................................................................................
Česk
..................................................................................................................
Português
..................................................................................................................
ไทย
..................................................................................................................
中文
..................................................................................................................
Español
..................................................................................................................
Slovenský
..................................................................................................................