Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

左边固定右边自适应 #9

Open
webVueBlog opened this issue Aug 28, 2022 · 0 comments
Open

左边固定右边自适应 #9

webVueBlog opened this issue Aug 28, 2022 · 0 comments

Comments

@webVueBlog
Copy link
Owner

   .box {
            height: 500px;
            display: flex;
        }
        .box div {
            height: 300px;
            text-align: center;
        }
        .box div.right {
            flex: 1;//右边自适应
            border: 1px solid #000000;
        }
        .box div.left {
            border: 1px solid #000000;
            flex-basis: 100px;//左边固定,优先级最高
        }
    //html
    <div class="box">
        <div class="left">左边固定效果</div>
        <div class="right">右边自适应效果</div>
    </div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant