Remember bloggers have done a CSS face questions, worth sharing with you, it is asked:
子元素可继承父元素的那些属性(多选)?
A.color B.background C.margin D.padding E.height F.font-size
Whether comrades already know the answer yet, bloggers give you an analysis wave
Questions to resolve:
1.块状元素可继承:text-indent 和 text-align
2.列表元素可继承:list-style, list-style-type, list-style-position, list-style-image
3.表格元素可继承:border-collapse
4.内联元素可继承:letter-spacing, word-spacing, white-space, line-height, color, font, font-family,
font-size, font-style,
font-variant, font-weight, text-decoration, text-transform, direction
5.所有元素可继承:visibility 和 cursor
6.不可继承:display, margin, border, padding, background, height, min-height, max-height,
width, min-width, max-width,overflow, position, left, right, top, bottom, z-index, float, clear,
table-layout, vertical-align, page-break-after, page-bread-before 和 unicode-bidi
Pure hand knock, may have wrong hands, forgive me, if wrong, we welcome the comments area message, bloggers will resume the first time & adoption. CSS attribute so much, I believe we half past one would be very difficult to remember, but remember that every day, a few days later is a qualitative leap. To the moment we have been aware of the correct answer is a: A and F
It is a second track surface JS questions, as follows
var foo = { n: 1 };
var foo = { n: 1 };
(function (foo) {
console.log(foo.n);
foo.n = 3;
var foo = { n: 2 };
console.log(foo.n);
})(foo);
console.log(foo.n);
A.1 2 3 B.undefined 2 1 C.报错 D.1 2 1
The result of the javascript code to execute in the browser is how much
First of all for everyone to resolve under
1. precompiled, var foo global variables, anonymous function function, var local variables foo
2. Code calculation is performed from top to bottom:
Global variable assignment foo foo = {n: 1}; Note:此值为对象,属于引用类型;
Pass parameters anonymous function foo = {n: 1} from execution; consoole.log (foo); Digital Output 1
Due to the presence foo local variable, then the variable assignment foo foo = {n: 3}, while parameter values are changed reference type,
Global variables are reassigned foo foo = {n: 3} foo local variables for re-assignment foo = {n: 2}; console.log (foo); 2 digital outputs;
Global variables foo = {n: 3}, so console.log (foo); Digital Output 3