心得笔记
1. 页首和页尾如何定住?------使用position:fixed;top:10px;left:0; .header { position: fixed; top: 0; left: 0; width: 100%; } .footer { position: fixed; bottom: 0; left: 0; width: 100%; } <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Title</title> <script src="../statics/vue.min.js"></script> <!-- 引入样式 --> <link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css"> <!-- 引入组件库 --> <script src="https://unpkg.com/element-ui/lib/index.js"></script> <style> body { margin: 0; padding: 0; } .header { position: fixed; top: 0; left: 0; width: 100%; } .footer {