最全前端开发面试问题及答案整理

来自Github秋风的原文

说说你对闭包的理解

Talk about your understanding of closures

使用闭包主要是为了设计私有的方法和变量。闭包的优点是可以避免全局变量的污染,缺点是闭包会常驻内存,会增大内存使用量,使用不当很容易造成内存泄露。

Using closures designed primarily to private methods and variables. Closure advantage of global variables are avoided contamination, the disadvantage is the closure will be permanent memory, the memory usage increases, improper use is likely to cause a memory leak.

闭包有三个特性:

Closures have three characteristics:

1.函数嵌套函数
2.函数内部可以引用外部的参数和变量
3.参数和变量不会被垃圾回收机制回收

  1. Function
  2. The internal function nested function can refer to external parameters and variables
  3. The parameters and variables will not be garbage collection mechanism Recycling

请你谈谈Cookie的弊端

You talk about the shortcomings of Cookie

cookie虽然在持久保存客户端数据提供了方便,分担了服务器存储的负担,但还是有很多局限性的。
第一:每个特定的域名下最多生成20个cookie

1.IE6或更低版本最多20个cookie
2.IE7和之后的版本最后可以有50个cookie。
3.Firefox最多50个cookie
4.chrome和Safari没有做硬性限制1.IE6 or earlier up to 20 cookie 
2.IE7 later version and last may have 50 cookie. 
3.Firefox up to 50 cookie 
4.chrome and Safari does not do hard limit. IE and Opera will clean up the least recently used cookie , Firefox will randomly to clean cookie .

IEOpera 会清理近期最少使用的cookieFirefox会随机清理cookie

cookie的最大大约为4096字节,为了兼容性,一般不能超过4095字节。

IE 提供了一种存储可以持久化用户数据,叫做userdata,从IE5.0就开始支持。每个数据最多128K,每个域名下最多1M。这个持久化数据放在缓存中,如果缓存没有清理,那么会一直存在。

IE can provide a way to store persistent user data, called UserData , from IE5.0 has supported. Each data up to 128K, under each domain up to 1M. The persistent data in the cache, if not cleaned the cache, it will always exist.

优点:极高的扩展性和可用性

Advantages: high scalability and availability

1.通过良好的编程,控制保存在cookie中的session对象的大小。
2.通过加密和安全传输技术(SSL),减少cookie被破解的可能性。
3.只在cookie中存放不敏感数据,即使被盗也不会有重大损失。
4.控制cookie的生命期,使之不会永远有效。偷盗者很可能拿到一个过期的cookie。1. Good programming, control the size of the session cookie stored in the object. 
2. encryption and secure transmission technology (SSL), to reduce the possibility of cookie to crack. 
3. Only non-sensitive data is stored in a cookie, even if stolen will not have significant losses. 
4. Control cookie lifetime, so it will not always be effective. Theft are likely to get an expired cookie.

缺点:

Disadvantages:

1.`Cookie`数量和长度的限制。每个domain最多只能有20条cookie,每个cookie长度不能超过4KB,否则会被截掉。2.安全性问题。如果cookie被人拦截了,那人就可以取得所有的session信息。即使加密也与事无补,因为拦截者并不需要知道cookie的意义,他只要原样转发cookie就可以达到目的了。3.有些状态不可能保存在客户端。例如,为了防止重复提交表单,我们需要在服务器端保存一个计数器。如果我们把这个计数器保存在客户端,那么它起不到任何作用。1.`Cookie` limit the number and length. Each domain can have a maximum of 20 cookie, each cookie length can not exceed 4KB, otherwise it will be truncated. 2. The security issues. If the cookie is intercepted, that person can get all the session information. Even if encryption is also unhelpful, because Interceptor does not need to know the meaning of the cookie, cookie forwarding as long as he can achieve their goals. 3. Some state can not be stored in the client. For example, in order to prevent duplicate submission form, we need to save a counter on the server side. If we put this counter is stored in the client, then it will not achieve any effect.

Browser local storage

浏览器本地存储

在较高版本的浏览器中,js提供了sessionStorageglobalStorage。在HTML5中提供了localStorage来取代globalStorage

In later versions of the browser, JS provides sessionStorage and globalStorage . In HTML5 provides in localStorage to replace globalStorage.

html5中的Web Storage包括了两种存储方式:sessionStoragelocalStorage

html5 The Web Storage includes two storage methods: sessionStorage and localStorage .

sessionStorage用于本地存储一个会话(session)中的数据,这些数据只有在同一个会话中的页面才能访问并且当会话结束后数据也随之销毁。因此sessionStorage不是一种持久化的本地存储,仅仅是会话级别的存储。

sessionStorage data stored locally for a session (session) in which the data only in the same session of the page to access data, and when the end of the session also will be destroyed. So sessionStorage not a persistent local storage, just session-level storage.

localStorage用于持久化的本地存储,除非主动删除数据,否则数据是永远不会过期的。

And localStorage for persistent local storage, unless the initiative to remove the data, or the data is never out of date.

web storage和cookie的区别

the difference between web storage and a cookie

Web Storage的概念和cookie相似,区别是它是为了更大容量存储设计的。Cookie的大小是受限的,并且每次你请求一个新的页面的时候Cookie都会被发送过去,这样无形中浪费了带宽,另外cookie还需要指定作用域,不可以跨域调用。

Web Storage concept and cookie similar, except that it is designed for higher-capacity storage. Cookie size is limited, and every time you request a new page when the Cookie will be sent in the past, so that virtually waste bandwidth, another cookie also need to specify the scope, not cross-domain calls.

除此之外,Web Storage拥有setItem,getItem,removeItem,clear等方法,不像cookie需要前端开发者自己封装setCookie,getCookie

In addition, Web Storage has setItem, getItem, removeItem, clear methods, unlike the cookie front-end developers need their own package setCookie, getCookie.

但是cookie也是不可以或缺的:cookie的作用是与服务器进行交互,作为HTTP规范的一部分而存在 ,而Web Storage仅仅是为了在本地“存储”数据而生

But the cookie is not indispensable: cookie 's role is to interact with the server as HTTP part of the specification exists, and Web Storage simply to the local "store" raw data

浏览器的支持除了IE7及以下不支持外,其他标准浏览器都完全支持(ie及FF需在web服务器里运行),值得一提的是IE总是办好事,例如IE7、IE6中的userData其实就是javascript本地存储的解决方案。通过简单的代码封装可以统一到所有的浏览器都支持web storage

Browser support in addition to IE7 and below are not supported, other standard browsers fully support (ie and FF need to run a web server in), it is worth mentioning that IE always good things, such as IE7, IE6 in the userData fact is javascript local storage solutions. By simple code package can be unified to all the browsers support Web storage.

localStoragesessionStorage都具有相同的操作方法,例如setItem、getItemremoveItem

localStorage and sessionStorage have the same method of operation, for example setItem, getItem and removeItem etc.

cookie 和session 的区别:

cookie and session distinction:

 1、cookie数据存放在客户的浏览器上,session数据放在服务器上。2、cookie不是很安全,别人可以分析存放在本地的COOKIE并进行COOKIE欺骗考虑到安全应当使用session。3、session会在一定时间内保存在服务器上。当访问增多,会比较占用你服务器的性能考虑到减轻服务器性能方面,应当使用COOKIE。4、单个cookie保存的数据不能超过4K,很多浏览器都限制一个站点最多保存20个cookie。5、所以个人建议:将登陆信息等重要信息存放为SESSION其他信息如果需要保留,可以放在COOKIE中1, cookie data is stored on the customer's browser, session data on the server. 2, cookie is not very safe, others can be analyzed at a local store and COOKIE COOKIE cheat should be used taking into account the security session. 3, session will be within a certain time saved on the server. When accessing the increase, it would be more occupy the performance of your server consider to reduce server performance, you should use COOKIE. 4, the data stored in a single cookie can not exceed 4K, many browsers are limited to a maximum of one site to save 20 cookie. 5, so personal recommendations: the login information and other important information is stored as SESSION additional information, if necessary, it can be placed in COOKIE

CSS 相关问题

CSS-related issues

display:none和visibility:hidden的区别?

display: none and visibility: hidden difference?

display:none  隐藏对应的元素,在文档布局中不再给它分配空间,它各边的元素会合拢,
就当他从来不存在。visibility:hidden  隐藏对应的元素,但是在文档布局中仍保留原来的空间。display: none to hide the corresponding elements in the document layout is no longer space allocated to it, it is the element of each side will be closed, on when he never existed. visibility: hidden hides the corresponding elements, but still retain the original layout of the space in the document. The difference in the link andimport CSS is?

CSS中 link 和@import 的区别是?

The difference in the link andimport CSS is?

(1) link属于HTML标签,而@import是CSS提供的; 
(2) 页面被加载的时,link会同时被加载,而@import引用的CSS会等到页面被加载完再加载;
(3) import只在IE5以上才能识别,而link是HTML标签,无兼容问题; 
(4) link方式的样式的权重 高于@import的权重.(1) link belong to HTML tags, and CSSimport is provided; 
(2) the page is loaded, link will also be loaded, but referencesimport CSS will wait until the page is finished loading reloading; 
(3) Import only to recognize in IE5 or more, while link is HTML tag, no compatibility issues; style right 
(4) linkimport way of weight above the weight of heavy. Similarities and Differences between absolute and float attributes: position

position:absolute和float属性的异同

Similarities and Differences between absolute and float attributes: position


A:共同点:
对内联元素设置`float`和`absolute`属性,可以让元素脱离文档流,并且可以设置其宽高。B:不同点:
float仍会占据位置,position会覆盖文档流中的其他元素。A: common: 
inline element set `float` and` absolute` property allows elements from the document flow, and can set its width and height. B: Different point: 
float will still occupy the position, position overrides other elements in the document flow.

介绍一下box-sizing属性?

Introduce the box-sizing property?

box-sizing属性主要用来控制元素的盒模型的解析模式。默认值是content-box
box-sizing property is primarily used to control element analytical model box model. The default value is content-Box.

  • content-box:让元素维持W3C的标准盒模型。元素的宽度/高度由border + padding + content的宽度/高度决定,设置width/height属性指的是content部分的宽/高
  • content-Box : Let element to maintain the standard W3C box model. Width / height of the element / height is determined by the border + padding + content width, set width / height attribute refers to the content portion of the width / height
  • border-box:让元素维持IE传统盒模型(IE6以下版本和IE6~7的怪异模式)。设置width/height属性指的是border + padding + content
  • border-Box : Let element to maintain the traditional box model IE (IE6 and IE6 ~ 7 the following versions of quirks mode). Set width / height attribute refers to the border + padding + content

标准浏览器下,按照W3C规范对盒模型解析,一旦修改了元素的边框或内距,就会影响元素的盒子尺寸,就不得不重新计算元素的盒子尺寸,从而影响整个页面的布局。

Under standard browser, according to W3C box model specification analysis, once the border or modify the elements within distance, it will affect the size of the box element, you have to recalculate the box the size of the elements, thus affecting the layout of the entire page.

CSS 选择符有哪些?哪些属性可以继承?优先级算法如何计算? CSS3新增伪类有那些?

CSS selectors are there? Which attributes can be inherited? Priority algorithm calculated? Added CSS3 pseudo-classes are those?

1.id选择器( # myid)
2.类选择器(.myclassname)
3.标签选择器(div, h1, p)
4.相邻选择器(h1 + p)
5.子选择器(ul > li)
6.后代选择器(li a)
7.通配符选择器( * )
8.属性选择器(a[rel = "external"])
9.伪类选择器(a: hover, li:nth-child)1.id selector (# myid) 
2. Class selector (.myclassname) 
3. Tag selectors (div, h1, P) 
4. adjacent selector (h1 + P) 
5. child selector (ul> li ) 
6. descendant selectors (li a) 
7. wildcard selector (*) 
8. attribute selector (a [rel = "external"]) 
9. pseudo-class selectors (a: hover, li: nth-child)
  • 可继承的样式: font-size font-family color, text-indent;

  • 不可继承的样式:border padding margin width height ;

  • 优先级就近原则,同权重情况下样式定义最近者为准;

  • 载入样式以最后载入的定位为准;
  • Inheritable style: font-size font-family color, text-indent;
  • Non Inherited Styles: border padding margin width height;
  • Priority under the principle of proximity, with weights whichever the case recently defined style;
  • Loading last loaded positioning styles to prevail;

优先级为:

Priority:

  !important >  id > class > tag  important 比 内联优先级高,但内联比 id 要高

CSS3新增伪类举例:

   
p:first-of-type 选择属于其父元素的首个 <p> 元素的每个 <p> 元素。
p:last-of-type  选择属于其父元素的最后 <p> 元素的每个 <p> 元素。
p:only-of-type  选择属于其父元素唯一的 <p> 元素的每个 <p> 元素。
p:only-child    选择属于其父元素的唯一子元素的每个 <p> 元素。
p:nth-child(2)  选择属于其父元素的第二个子元素的每个 <p> 元素。
:enabled  :disabled 控制表单控件的禁用状态。
:checked        单选框或复选框被选中。

position的值, relative和absolute分别是相对于谁进行定位的?

position values, relative and absolute are positioned with respect to whom?

absolute 生成绝对定位的元素, 相对于最近一级的 定位不是 static 的父元素来进行定位。fixed (老IE不支持)生成绝对定位的元素,相对于浏览器窗口进行定位。 relative 生成相对定位的元素,相对于其在普通流中的位置进行定位。 static  默认值。没有定位,元素出现在正常的流中absolute generate absolute element positioned relative to the recent level is not static positioned parent element to be positioned. fixed (old IE does not support) to generate absolute element positioned relative to the browser window positioning. relative generating element relative positioning, relative to its position in the general stream positioning. static default. No positioning element occurs in the normal stream

CSS3有哪些新特性?

CSS3 What's new?

CSS3实现圆角(border-radius),阴影(box-shadow),
对文字加特效(text-shadow、),线性渐变(gradient),旋转(transform)
transform:rotate(9deg) scale(0.85,0.90) translate(0px,-30px) skew(-9deg,0deg);//旋转,缩放,定位,倾斜
增加了更多的CSS选择器  多背景 rgba 
在CSS3中唯一引入的伪元素是::selection.
媒体查询,多栏布局
border-imageCSS3 rounded corners (border-radius), shadow (box-shadow), 
add special effects to the text (text-shadow,), a linear gradient (gradient), rotation (transform) 
transform: Rotate (9deg) Scale (0.85,0.90) translate (0px, -30px) skew (-9deg, 0deg); // rotation, scaling, positioning, tilt 
adds more CSS selectors more background rgba 
unique introduced in CSS3 pseudo-elements :: selection. 
Media queries , multi-column layout 
border-image

XML和JSON的区别?

XML and JSON difference?

(1).数据体积方面。
JSON相对于XML来讲,数据的体积小,传递的速度更快些。
(2).数据交互方面。
JSON与JavaScript的交互更加方便,更容易解析处理,更好的数据交互。
(3).数据描述方面。
JSON对数据的描述性比XML较差。
(4).传输速度方面。
JSON的速度要远远快于XML。(1) The data volume terms. 
XML JSON relative terms, the volume of data is small, the speed of delivery faster. 
(2) aspects of data exchange. 
JSON and JavaScript interaction more convenient and easier to parse processing, better data interaction. 
(3) The data described aspects. 
JSON description of data than XML poor. 
(4) The transmission speed. 
JSON's speed is much faster than XML.

对BFC规范的理解?

BFC norms of understanding?

      BFC,块级格式化上下文,一个创建了新的BFC的盒子是独立布局的,盒子里面的子元素的样式不会影响到外面的元素。在同一个BFC中的两个毗邻的块级盒在垂直方向(和布局方向有关系)的margin会发生折叠。(W3C CSS 2.1 规范中的一个概念,它决定了元素如何对其内容进行布局,以及与其他元素的关系和相互作用。)BFC, block-level formatting context, a BFC created a new box is an independent layout, style, child elements inside the box will not affect the outside elements. In the same BFC two adjoining block-level box in the vertical direction (the direction of a relationship and layout) of margin will collapse from happening. (A concept W3C CSS 2.1 specification, which determines how the elements in the layout of its contents, and its relationship with other elements and interactions.)

解释下 CSS sprites,以及你要如何在页面或网站中使用它。

Talk about your understanding of the semantic?

CSS Sprites其实就是把网页中一些背景图片整合到一张图片文件中,再利用CSS的“background-image”,“background- repeat”,“background-position”的组合进行背景定位,background-position可以用数字能精确的定位出背景图片的位置。这样可以减少很多图片请求的开销,因为请求耗时比较长;请求虽然可以并发,但是也有限制,一般浏览器都是6个。对于未来而言,就不需要这样做了,因为有了`http2`。
CSS Sprites in fact, the number of pages in the background image into an image file, and then use the CSS "background-image", "background- repeat", "background-position" a combination of background positioning, background-position can be used Digital can accurately locate the position of the background image. This can reduce the cost of many pictures request because the request takes a relatively long; although requests can be complicated, but there are limits, are six general browser. For the future, there is no need to do so, and because of `http2`.

html部分

html part

说说你对语义化的理解?

Talk about your understanding of the semantic?

1,去掉或者丢失样式的时候能够让页面呈现出清晰的结构
2,有利于SEO:和搜索引擎建立良好沟通,有助于爬虫抓取更多的有效信息:爬虫依赖于标签来确定上下文和各个关键字的权重;
3,方便其他设备解析(如屏幕阅读器、盲人阅读器、移动设备)以意义的方式来渲染网页;
4,便于团队开发和维护,语义化更具可读性,是下一步吧网页的重要动向,遵循W3C标准的团队都遵循这个标准,可以减少差异化。1, removed or lost when allowing page style showing clear structure 
2, is conducive to SEO: search engines and to establish good communication helps crawlers to crawl more useful information: reptiles rely on labels to determine the context and the individual right keyword weight; 
3, easy to resolve other devices (such as a screen reader, blind readers, mobile devices) in meaningful ways to render web pages;     4, easy to team development and maintenance, more readable semantic, is under Important Trends step right of the page, follow the W3C standards team follow this standard, the difference can be reduced.

Doctype作用? 严格模式与混杂模式如何区分?它们有何意义?

Doctype role? Strict mode and mixed mode how to distinguish? They mean?

(1)、<!DOCTYPE> 声明位于文档中的最前面,处于 <html> 标签之前。告知浏览器以何种模式来渲染文档。 (2)、严格模式的排版和 JS 运作模式是  以该浏览器支持的最高标准运行。(3)、在混杂模式中,页面以宽松的向后兼容的方式显示。模拟老式浏览器的行为以防止站点无法工作。(4)、DOCTYPE不存在或格式不正确会导致文档以混杂模式呈现。  (1), <! DOCTYPE> declaration in the document in the front, in the <html> tag before. Tells the browser to render the document in which mode. (2) strict mode layout and JS mode of operation is based on the highest standards of the browser supports running. (3), in promiscuous mode, page backward compatible with liberal display. Simulate the behavior of older browsers do not work to prevent the site. (4), DOCTYPE does not exist or incorrectly formatted document will lead to promiscuous mode rendering.   

你知道多少种Doctype文档类型?

Do you know how many document types Doctype?

 该标签可声明三种 DTD 类型,分别表示严格版本、过渡版本以及基于框架的 HTML 文档。HTML 4.01 规定了三种文档类型:Strict、Transitional 以及 Frameset。XHTML 1.0 规定了三种 XML 文档类型:Strict、Transitional 以及 Frameset。
Standards (标准)模式(也就是严格呈现模式)用于呈现遵循最新标准的网页,而 Quirks(包容)模式(也就是松散呈现模式或者兼容模式)用于呈现为传统浏览器而设计的网页。The label can be declared DTD three types, respectively strict version, interim version and an HTML-based documentation framework. HTML 4.01 specifies three document types: Strict, Transitional, and Frameset. XHTML 1.0 specifies three XML document types: Strict, Transitional, and Frameset. Standards (standard) mode (that is, in strict rendering mode) complies with the latest standards for rendering Web pages, while Quirks 

(inclusive) mode (that is, loose rendering mode or compatibility mode) is used to render conventional web browser designed.

HTML与XHTML——二者有什么区别

HTML and XHTML-- What is the difference

区别:
1.所有的标记都必须要有一个相应的结束标记
2.所有标签的元素和属性的名字都必须使用小写
3.所有的XML标记都必须合理嵌套
4.所有的属性必须用引号""括起来
5.把所有<和&特殊符号用编码表示
6.给所有属性赋一个值
7.不要在注释内容中使“--”
8.图片必须有说明文字Difference: 
1. All tags must have a corresponding end tag element and attribute names 
2. All tags must be lowercase 
3. All the XML tags must be properly nested 
4. All attributes must be quoted. " "enclosed 
5. Put all the <and & special symbols with the coded representation 
6. assign a value to all of the properties in the comment 7. Do not manipulation "-" 
8. The image must have caption

常见兼容性问题?

Common compatibility problems?

* png24位的图片在iE6浏览器上出现背景,解决方案是做成PNG8.也可以引用一段脚本处理.* 浏览器默认的margin和padding不同。解决方案是加一个全局的*{margin:0;padding:0;}来统一。* IE6双边距bug:块属性标签float后,又有横行的margin情况下,在ie6显示margin比设置的大。 * 浮动ie产生的双倍距离(IE6双边距问题:在IE6下,如果对元素设置了浮动,同时又设置了margin-left或margin-right,margin值会加倍。)#box{ float:left; width:10px; margin:0 0 0 100px;} 这种情况之下IE会产生20px的距离,解决方案是在float的标签样式控制中加入 ——_display:inline;将其转化为行内属性。(_这个符号只有ie6会识别)*  渐进识别的方式,从总体中逐渐排除局部。 * Png24 bit image appears on iE6 browser background, the solution is made ​​PNG8. It can refer to a script processing. * The browser's default margin and padding. The solution is to add a global * {margin: 0; padding: 0;} to unify. * IE6 bilateral Distance bug: After the block attribute labels float, there are rampant margin circumstances, in ie6 show larger margin than the settings. * Double ie generated from the float (IE6 bilateral distance problem: In IE6, if the element is set to float, while setting the margin-left or margin-right, margin value will double.) 

#box {float: left; width: 10px; margin: 0 0 0 100px;}

Under such circumstances IE will produce 20px distance, the solution is to add --_ display in the label style float control: inline; be converted to inline property. (_ This symbol identifies only ie6)

* gradual recognition of the way from the local population gradually excluded. 首先,巧妙的使用“\9”这一标记,将IE游览器从所有情况中分离出来。 接着,再次使用“+”将IE8和IE7、IE6分离开来,这样IE8已经独立识别。First, the clever use of "\ 9" This marks the IE's browser separated out from all the circumstances. Then, again using the "+" to IE8 and IE7, IE6 separated, so that IE8 has been independently identified. css.bb{background-color:#f1ee18;/*所有识别*/.background-color:#00deff\9; /*IE6、7、8识别*/+background-color:#a200ff;/*IE6、7识别*/_background-color:#1e0bd1;/*IE6识别*/ } *  IE下,可以使用获取常规属性的方法来获取自定义属性,也可以使用getAttribute()获取自定义属性;Firefox下,只能使用getAttribute()获取自定义属性. 解决方法:统一通过getAttribute()获取自定义属性.* IE下,event对象有x,y属性,但是没有pageX,pageY属性; Firefox下,event对象有pageX,pageY属性,但是没有x,y属性.* 解决方法:(条件注释)缺点是在IE浏览器下可能会增加额外的HTTP请求数。* Chrome 中文界面下默认会将小于 12px 的文本强制按照 12px 显示, 可通过加入 CSS 属性 -webkit-text-size-adjust: none; 解决.* 超链接访问过后hover样式就不出现了 被点击访问过的超链接样式不在具有hover和active了解决方法是改变CSS属性的排列顺序:
L-V-H-A :  a:link {} a:visited {} a:hover {} a:active {}* 怪异模式问题:漏写DTD声明,Firefox仍然会按照标准模式来解析网页,但在IE中会触发怪异模式。为避免怪异模式给我们带来不必要的麻烦,最好养成书写DTD声明的好习惯。现在可以使用[html5](http://www.w3.org/TR/html5/single-page.html)推荐的写法:`<doctype html>`* 上下margin重合问题
ie和ff都存在,相邻的两个div的margin-left和margin-right不会重合,但是margin-top和margin-bottom却会发生重合。
解决方法,养成良好的代码编写习惯,同时采用margin-top或者同时采用margin-bottom。
* ie6对png图片格式支持不好(引用一段脚本处理)* under IE, you can use the method to get the general properties for custom properties, 

you can also use getAttribute () Gets the custom attributes;
under Firefox, only Use getAttribute () Gets custom attributes.
Workaround: Uniform for custom properties through getAttribute ().

* Under IE, event object has x, y attributes, but no pageX, pageY property; 

under Firefox, event object has pageX, pageY property, but there is no x, y properties.

* Solution :( conditional comments) drawback is that in IE browser may add additional HTTP requests. * Under Chrome Chinese interface will be smaller than default to force the 12px 12px text display, 

by the addition of CSS properties -webkit-text-size-adjust: none; resolved.

* After hover style is not accessible by hyperlink is clicked appears visited The Hyperlink style does not have hover and active the solution is to change the order of CSS properties: 

LVHA: a: link {} a: visited {} a: hover {} a: Active {}

* weird modalities: Leakage write DTD statement, Firefox will still be in accordance with the standard model to resolve the page, but IE will trigger quirks mode. To avoid quirks mode gives us unnecessary trouble, it is best to develop the good habit of writing DTD declaration. You can now use [html5] (http://www.w3.org/TR/html5/single-page.html) recommended notation: `<DOCTYPE html>` * top and bottom margin overlap problem 

ie and ff are present, adjacent both margin-left and margin-right does not coincide div, but margin-top and margin-bottom but it will coincide occur.
Solution, to develop good coding habits, while using margin-top or while using margin-bottom.

* Ie6 png image format support is not good for (quote a script processing)

解释下浮动和它的工作原理?清除浮动的技巧

Floating and explain how it works? Clear float tips

浮动元素脱离文档流,不占据空间。浮动元素碰到包含它的边框或者浮动元素的边框停留。
Floating elements from the document flow, does not occupy space. Floats across the border to stay its borders contain or floating elements. 1.使用空标签清除浮动。这种方法是在所有浮动标签后面添加一个空标签 定义css clear:both. 弊端就是增加了无意义标签。
2.使用overflow。给包含浮动元素的父标签添加css属性 overflow:auto; zoom:1; zoom:1用于兼容IE6。
3.使用after伪对象清除浮动。该方法只适用于非IE浏览器。具体写法可参照以下

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/294945.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

C# 10 新特性 —— 补充篇

C# 10 新特性 —— 补充篇Intro前面已经写了几篇文章介绍 C# 10 新特性的文章&#xff0c;还有一些小的更新Constant interpolated strings在之前的版本中&#xff0c;如果想要使用插值字符串来&#xff0c;则不能声明为一个常量如果依赖于一个常量的插值字符串就只能声明为一个…

达内TTS6.0课件oop_day01

转载于:https://www.cnblogs.com/suncoolcat/p/3329114.html

过年前谈个恋爱很过分吗?

1 小盆友的广东口音有多好玩&#xff1f;&#xff08;素材来源网络&#xff0c;侵删&#xff09;▼2 今年你进步了吗&#xff1f;&#xff08;素材来源网络&#xff0c;侵删&#xff09;▼3 收到课本的丁真&#xff08;素材来源网络&#xff0c;侵删&#xff09;▼4 上海业主…

打独立运行包遇到无法trim咋解决

背景介绍工作中我用到kotlin写代码&#xff0c;在orm上ktorm是一款非常优秀的操作db的框架&#xff0c;我喜欢用它所以我写了一个插件能够增加我的工作效率&#xff0c;这款idea插件的主体逻辑是.net开发的(没错是跨平台的.net)。因为db-schema的解析逻辑我很在以前写的一个vis…

用html制作班级课程表实例,在网页制作中用表格制作一张课程表如下图。

侠客岛的含笑 Document (2013)学年第(2)学期 课程表上午一&nbsp下午三&nbsp晚上五&nbsp

打破校史!这位参与发表学校首篇Science的博士小姐姐,近日一作再发Nature

全世界只有3.14 % 的人关注了爆炸吧知识本文由科研大匠&#xff08;Id:keyandajiang&#xff09;综合整理自西南交大新闻网、官微、扬华研究生新闻中心导读&#xff1a;12月10日&#xff0c;Nature发表了西南交通大学材料科学与工程学院博士毕业生杨倩&#xff08;现为英国曼彻…

2022版Win11重磅升级!

微软宣布 Windows 11 2022 年更新将重点改进 WinUI 的性能。包括但不限于 Windows 11 文件资源管理器的启动速度、右键桌面、日期和时间弹出、音量调整、操作中心和通知中心等响应体验等。WinUI 的全称为Windows UI 库&#xff0c;是适用于 Windows 桌面应用程序和 UWP 应用程序…

Mysql Engine【innodb,myisam】

2019独角兽企业重金招聘Python工程师标准>>> Innodb,Myisam都是Mysql数据库存储的引擎&#xff0c;Innodb支持事务等数据库高级特性&#xff0c;Myisam不支持&#xff0c;但比较快速。 ISAM 是一个定义明确且历经时间考验的数据表格管理方法&#xff0c;它在设计时就…

ALV Styles in Field catalogue using OOPS

转自http://www.saptechnical.com/Tutorials/ALV/Styles/demo.htm By Swarna S, Tata Consultancy Services *&---------------------------------------------------------------------* *& Report ZALV_STYLES * *…

自称“房奴”的博士靠开店卖SCI论文10年盈利近百万,论文买卖你怎么看?

全世界只有3.14 % 的人关注了爆炸吧知识本文来源&#xff1a;中国青年报、武汉晚报 首席记者杨佳峰导读&#xff1a;10年前&#xff0c;一位自称“房奴博士”的刚毕业博士生在网上开启了他的SCI售卖小铺。每篇 1-2 万元&#xff0c;声称一年内卖出去的论文中有 8 篇都进了SCI索…

既生瑜何生亮 access_token VS refresh_token

中国有句老话, 既生瑜何生亮, 既然有我周瑜在世, 为什么老天还要一个诸葛亮啊&#xff1f;同样的, 众所周知, 在 OAuth 2.0 授权协议中, 也有两个令牌 token , 分别是 access_token 和 refresh_token, 为什么已经有了 access_token, 还需要 refresh_token 呢?我们先看下面两者…

关于计算机软件系统的知识,二、计算机软件系统基本知识

一、计算机软件系统图示咱们先来直观的看一下&#xff0c;我就直接上图了打开今日头条&#xff0c;查看更多精彩图片计算机软件系统(一)系统软件在说系统软件之前我想用一张图让大家清晰的了解下&#xff0c;计算机硬件系统与软件系统的关系&#xff1a;计算机硬件系统与软件系…

Nature评选年度十大科学发现:北师大博士凭借天眼研究入选!

全世界只有3.14 % 的人关注了爆炸吧知识本文来源&#xff1a;Bio生物世界、北京师范大学新闻网、百度百科、北京师范大学官网近日&#xff0c;Nature 盘点了2020年度十大科学发现&#xff0c;这其中即包括新冠病毒研究、冷冻电镜突破、压力导致白发的原因、HIV治疗、银河系中的…

Android之集成友盟推送功能

友盟是中国最大的移动开发者服务平台,为移动开发者提供免费的应用统计分析、社交分享、消息推送、自动更新、在线参数、移动推广效果分析、微社区等app开发和运营解决方案。 如何快速集成友盟推送功能&#xff1a; 1. 注册友盟账号 友盟开发者账号的注册地址:http://www.umeng.…

Win11手机应用大改!全新界面来袭

在 Windows 11 中&#xff0c;应用商店、画图、照片、计算器等系统内置应用都获得了全新的改进&#xff0c;这回终于轮到你的手机应用了。在今年 9 月的微软 Windows 11 硬件暨全新 Surface 设备发布会上&#xff0c;微软曾简要地展示了 Windows 11 内置应用 Your Phone&#x…

serialization机制

首先说明一下序列化的知识&#xff1a; java中的序列化(serialization)机制能够将一个实例对象的状态信息写入到一个字节流中&#xff0c;使其可以通过socket进行传输、或者持久化存储到数据库或文件系统中&#xff1b;然后在需要的时候&#xff0c;可以根据字节流中的信息来重…

java2的7次方怎么表示_静态市盈率要怎么看?

静态市盈率是估值一个公司质地的指标&#xff0c;同时它也就是大家常说的市盈率。它体现的是一个企业按照目前的盈利水平&#xff0c;我们买入后需要多长时间才能回本。那么静态市盈率高好还是低好呢&#xff1f;静态市盈率低好&#xff0c;高就意味着该股高估了。静态市盈率是…

中国科幻扛鼎之作,原来真的不止刘慈欣

▲ 点击查看50年前的某天&#xff0c;一个小孩和一群大人一起仰望着晴朗的天空&#xff0c;看着中国第一颗人造卫星“东方红一号”&#xff0c;默默地担心它会撞到其他星星。而这份小小的担心&#xff0c;成了他后来开始创造科幻的动力和梦想。这个仰望晴空的小孩叫刘慈欣。如果…

程学旗 计算机,徐明伟-青年科学家奖-中国计算机学会

2010CCF青年科学家奖获奖者徐明伟 教授清华大学分别于1994年和1998年在清华大学计算机科学与技术系获工学学士和工学博士学位。现为清华大学计算机系教授&#xff0c;博士生导师&#xff0c;网络所所长&#xff0c;计算机学会YOCSEF AC委员&#xff0c;中国通信标准化协会技术管…

.net6给winform带来的新功能

首先简化了Program文件&#xff0c;引入了全局命名空间&#xff0c;但顶级语句由于Main函数的特性[STAThread]没有引用进来。namespace WinFormsDemo {internal static class Program{/// <summary>/// The main entry point for the application./// </summary>[…