老师怎么让下载到右边

来源:3-4 自由编程

我代码么问题

2022-01-05 20:09:34

相关代码:

<!DOCTYPE html>
<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>Document</title>
    <style>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        .body {
            font-size: 12px;
            color: #5d655d;
        }

        a {
            font-size: 12px;
            text-decoration: none;
            color: #686868;
        }

        [data-dpr='2'] body,
        [data-dpr='2'] img,
        [data-dpr='2'] a {
            font-size: 24px;
        }

        [data-dpr='3'] body,
        [data-dpr='3'] img,
        [data-dpr='3'] a {
            font-size: 36px;
        }

        img {
            vertical-align: top;
            width: 100%;
            height: 100%;
            border: none;
        }

        html,
        body {
            width: 100%;
            height: 100%;
        }

        html,
        body {
            width: 100%;
            height: 100%;
        }

        .container {
            display: flex;
            width: 100%;
            height: 2.5rem;
            background-color: #ccc;
        }

        .container .topbar_container {
            display: flex;
            width: 100%;
            position: fixed;
            top: 0;
            left: 0;
            z-index: 9999;
            height: 2.5rem;

        }

        .container .topbar_container .loge,
        .down {
            display: flex;
            justify-content: center;
            align-items: center;
        }

        .container .topbar_container .down {
            display: flex;
            /* width: 100%; */

            height: 100%;
            background-color: rgb(233, 193, 199);
            border-radius: 25%;

        }

        .container .topbar_container .down a {
            display: flex;
            justify-content: center;
            align-items: center;
        }
    </style>
</head>

<body>
    <header class="container">
        <div class="topbar_container">
            <div class="logo">
                <img src="./images/logo.png" alt="">
            </div>

            <div class="down">
                <a href="">下载APP</a>
            </div>
        </div>
    </header>
</body>

</html>


写回答

1回答

好帮手慕久久

2022-01-06

同学你好,可以设置justify-content属性实现效果,例如:

方式1:

https://img.mukewang.com/climg/61d64b1c0904ca2805630316.jpg

方式2:

https://img.mukewang.com/climg/61d64ab609b36ebc07540351.jpg

同学尝试一下,并把样式彻底写完,然后发出来,老师们再为你检查效果。

祝学习愉快!

0

0 学习 · 15276 问题

查看课程