• CSS绝对定位实战


    效果:

    源码:

    <!DOCTYPE>
    <html>
        <head>
            <meta charset="utf-8">
            <link href="https://fonts.googleapis.com/css2?family=Lobster&display=swap" rel="stylesheet">
            <style type="text/css">
                * {
                    margin: 0;
                    padding: 0;
                }
                .container {
                     400px;
                    height: 200px;
                    background-color: #7bbfea;
                    position: absolute;
                    top: 50%;
                    left: 50%;
                    margin: -100px 0 0 -200px;
                    border-radius: 10px;
                }
                .qrcode {
                     100px;
                    height: 100px;
                    position: absolute;
                    top: 50%;
                    left: 50%;
                    margin-top: -50px;
                    margin-left: 60px;
                }
                .about {
                     230px;
                    height: 200px;
                    background-color: #fffef9;
                    position: absolute;
                    top: 0;
                    left: 0;
                    border-radius: 5px 25px 25px 5px;
                    box-shadow: 5px 5px 5px #ccc inset;
                    border-bottom: 1px solid #ccc;
                }
                section {
                    position: absolute;
                    height: 40px;
                     150px;
                    left: 50%;
                    top: 50%;
                    margin-top: -30px;
                    margin-left: -75px;
                    letter-spacing: 5px;
                    font-family: 'Lobster', cursive;
                    text-align: center;
                }
                section p {
                    margin-top: .2em;
                    font-size: 1.1em;
                }
                img {
                     100%;
                    border-radius: 10px;
                    opacity: .85;
                }
            </style>
        </head>
        <body>
           <div class="container">
               <div class="about">
                   <section>
                       <h2>Mr.Yao</h2>
                       <p>Hello World</p>
                   </section>
               </div>
                <div class="qrcode">
                    <img src="QQ%E5%9B%BE%E7%89%8720200521231236.jpg" alt="qrcode">
               </div>
            </div>
        </body>
    </html>
    
  • 相关阅读:
    资料存储
    Django学习
    爬虫学习
    time()模块
    一些功能性小程序段
    装饰器
    函数的知识点(理解难点剖析)
    linux中的回收站机制,防止rm -rf 事件
    python--列表解析式 -- 知识整理
    python- 时间模块 datatime 知识整理
  • 原文地址:https://www.cnblogs.com/1328497946TS/p/12934507.html
Copyright © 2020-2023  润新知