1. 制作一个在线QQ客服的固定定位(QQ客服用图片就行)

  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8">
  5. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  6. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  7. <title>QQ客服固定定位</title>
  8. <link rel="stylesheet" href="./css/kf.css">
  9. </head>
  10. <body>
  11. <div class="kf">
  12. <img src="https://ibb.co/4NS2nYZ" alt="" class="tp">
  13. </div>
  14. </body>
  15. </html>

kf.css

  1. .tp{
  2. position: fixed;
  3. left: 80%;
  4. }
  5. html{
  6. background-color: cornsilk;
  7. position: relative;
  8. min-height: 1500px;
  9. }

三行三列的定位布局

  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8">
  5. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  6. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  7. <title>Document</title>
  8. <link rel="stylesheet" href="./css/xm3.css">
  9. </head>
  10. <body>
  11. <header>
  12. <h1>页眉</h1>
  13. </header>
  14. <div class="mainbody">
  15. <aside class="left">左边栏</aside>
  16. <main class="main">中间栏</main>
  17. <aside class="right">右边栏</aside>
  18. </div>
  19. <footer>
  20. <h1>页脚</h1></footer>
  21. </body>
  22. </html>

css样式

body.css

  1. @import url(/css/header.css);
  2. @import url(/css/footer.css);
  3. @import url(./mainbody.css);
  4. *{
  5. padding: 0;
  6. margin: 0;
  7. box-sizing: border-box;
  8. }

mainbody.css

  1. .mainbody{
  2. background-color: beige;
  3. height: 80vh;
  4. display: flex;
  5. }
  6. .main{
  7. width: 60%;
  8. background-color: rgb(107, 184, 19);
  9. min-height: 20vh;
  10. }
  11. .left{
  12. background-color: violet;
  13. min-width: 20%;
  14. min-height: 20vh;
  15. }
  16. .right{
  17. min-width: 20%;
  18. min-height: 20vh;
  19. background-color: lawngreen;
  20. }

header.css

  1. header{
  2. background-color: aqua;
  3. width: 100vw;
  4. height: 10vh;
  5. line-height: 10vh;
  6. text-align: center;
  7. }

footer.css

  1. footer{
  2. background-color: aqua;
  3. height: 10vh;
  4. line-height: 10vh;
  5. text-align: center;
  6. }

更多相关文章

  1. 0702 作业请求老师审批
  2. CSS_0702作业
  3. 关于定位的总结以及相关单位的理解
  4. 三行三列的定位布局中演示QQ客服的固定定位
  5. 前端作业-在线QQ客服的固定定位&三行三列的定位布局
  6. 固定定位以及三行三列的定位布局
  7. 在线客服固定定位和三行三列布局
  8. CSS固定定位及传统三行三列布局实例
  9. 固定定位的联系客服+简易的三行三列布局

随机推荐

  1. 解决Flutter 编译异常path_provider
  2. Android App开发基础篇—数据存储(SP和文
  3. 服务器搭建快速入门——适用于Android应
  4. Android下的配置管理之道之高通拆仓
  5. Android开发规范详解
  6. 【Android】进程与线程基本知识
  7. 【Android】Android 多个APK数据共享
  8. android httpclient基本用法
  9. Android 应用程序签名、发布
  10. 获取Android SDK 源代码并在Eclipse中关