Comments (4)
Q2: 什么是CSS定位?
from web_q_a.
A1: 闭包是函数在执行的时候,能够记住它所定义的词法作用域,或者也可以说闭包是指有权访问另一个函数作用域中变量的函数。闭包的优点是可以实现私有数据(方法或者变量),这是面向对象编程的特征之一,以及避免全局变量的污染。缺点是闭包会常驻内存,增大内存使用量,使用不当容易内存泄漏。
from web_q_a.
Q2: 什么是CSS定位?
CSS定位有相对定位,绝对定位,固定定位这3种,当然position样式不只有这3种取值,还有默认的static和inherit,其中相对定位没有脱离文档流,元素在文档流中还占有位置,它只是相对它自己在文档中的位置做的一个偏移,相对定位一般用于元素位置的微调,或者子绝父相中其子元素的绝对定位。而绝对定位和固定定位脱离文档流了,绝对定位是相对于它最近一个设置了定位属性(relative,absolute,fixed都可以)的父级元素进行的定位,而固定定位是相对于浏览器当前可视窗口(区域)的定位,不管浏览器滚动条怎么滚动,它在可视区域中的位置都保持不变。
from web_q_a.
vue-router中在标签中router-link指定tag路由跳转,和在组件标签中绑定点击事件然后在js中直接push或者go进行路由跳转,有什么场景下的优缺点?
from web_q_a.
Related Issues (2)
- Web前端学习路线总结 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from web_q_a.