在线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>Document</title>
  8. </head>
  9. <style>
  10. body{
  11. position: relative;
  12. }
  13. .qq{
  14. position:fixed;
  15. bottom: 5rem;
  16. right: 1rem;
  17. }
  18. </style>
  19. <body>
  20. <div class="qq">
  21. <a target="_blank" href="http://wpa.qq.com/msgrd?v=3&uin=2274666983&site=qq&menu=yes"><img border="0" src="http://wpa.qq.com/pa?p=2:2274666983:51" alt="点击这里给我发消息" title="点击这里给我发消息"/></a>
  22. </div>
  23. </body>
  24. </html>

三行三列的定位布局

图示:

代码实现

  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. </head>
  9. <style>
  10. * {
  11. margin: auto;
  12. padding: auto;
  13. font-size: 10px;
  14. }
  15. body {
  16. min-width: 10rem;
  17. }
  18. .zhudiv {
  19. position: relative;
  20. }
  21. .head {
  22. height: 2rem;
  23. background-color: aquamarine;
  24. }
  25. .foot {
  26. width: 100%;
  27. height: 2rem;
  28. background-color: aquamarine;
  29. position: fixed;
  30. bottom: 0;
  31. }
  32. .zuo {
  33. width: 10rem;
  34. position: fixed;
  35. right: ;
  36. margin: 1px;
  37. top: 2rem;
  38. bottom: 2rem;
  39. background-color: blueviolet;
  40. }
  41. .zhon {
  42. position:fixed;
  43. right: 10rem;
  44. left: 10rem;
  45. margin: 1px;
  46. top: 2rem;
  47. bottom: 2rem;
  48. background-color: coral;
  49. }
  50. .you {
  51. width: 10rem;
  52. position: fixed;
  53. right: 0;
  54. margin: 1px;
  55. top: 2rem;
  56. bottom: 2rem;
  57. background-color: blueviolet;
  58. }
  59. </style>
  60. <body>
  61. <div class="zhudiv">
  62. <div class="head"></div>
  63. <div>
  64. <div class="zuo">左手</div>
  65. <div class="zhon">身体</div>
  66. <div class="you">右手</div>
  67. </div>
  68. <div class="foot"></div>
  69. </div>
  70. </body>
  71. </html>

总结:在内容区关于左中右区块,自己的思想是每一个盒子都要设置宽度,但是被老师点一下后,才明白有一些是可以不用宽度的,get到了,思想不能太死板··

更多相关文章

  1. Android(安卓)10 定位问题,获取NMEA(支持5.0~10.0)
  2. Android中GPS定位的简单应用
  3. android 定位服务
  4. android 定位服务
  5. android linker (1) —— __linker_init()
  6. Android(安卓)AGPS 定位 测试程序
  7. android 百度地图SDK 获得详细路线信息
  8. 高德地图Android,绘制自定义定位蓝点、marker、面
  9. Android实现手机定位的案例代码

随机推荐

  1. 调用user32.dll显示其他窗口
  2. 关于C#winform如何实现右下角弹出窗口结果
  3. 什么是Less?koala配置及使用
  4. 使用Action的模型绑定实例教程
  5. C#中networkcomms3.0如何实现模拟登陆的
  6. Parser(解析器)的使用实例教程
  7. EF架构--FluentValidation的实际用法
  8. 关于csharp的实例教程
  9. 微信公众平台SDK核心库的详细介绍
  10. C#集合类有哪些?