Front-end Learning-Test paper 1 (out of 100+20,90)
First, fill in the blanks (4 points per question, total 20 points):
- html{font-size:12px;} div{font-size:2.5rem},div The font size is: _30px_____
- There are up to two div labeled A and b,a{margin-bottom:20px} b{margin-top:30px}, the spacing between AB, regardless of browser compatibility, is: __30px______
- The simplest notation for making a div centered around and the top and bottom margins are 3 times times the font size is: __margin:3em auto__________________
- The CSS property that allows the block-level elements to be arranged horizontally without using a float is: _________inline inline-block _________
- In the CSS selector, the selector for declaring the node ID is: ______#____ selector
Second, the choice question (4 points per question, common 20 points):
- (D) Picture formats that can render transparency are:
A. jpg
B. gif
C. Png8
D. Png24
Transparency! = Transparency 0//Only PNG24
GIF PNG8 are all without alpha channels.
- (C) Which of the following options is the group selector:
A. div > Span >p{...}
B. Div #span #p {...}
C. Div, span, p{...}
D. Div. span. p{...}
- (a) The following selections, not block-level elements and intra-line element differences, are:
A. Need to clear the float or not
B. Exclusive line and another row
C. High-wide attributes are valid or not
D. In the same row as the adjacent element or not
- (C) in the following label, the default is Inline-block:
A. Section
B. Article
C. Label
D. blockquote
HTML has a default IB, all form elements are the default IB//c is a FORM element
- (C) The attributes that control the hiding and placeholder of elements are:
A. Overflow:hidden;
B. Display:none;
C. Visibility:hidden;
D. Text-indent:-100%;
A hidden Overflow part//b Hidden C viewable area is visible or not, occupying a position.
Three, non-problem (4 points per question, total 20):
- (wrong) <! DOCTYPE html> is the wrong declarative notation, declaring that the document type must be lowercase;
- (wrong) A webpage can only have one
- (wrong) inline style sheets should be written inside the Web page, and the outer style sheet should be written outside the Web page;
- Both RGBA and opacity are transparent, and the difference is that RGBA is only for color transparency, while opacity makes all the contents of DOM elements and elements transparent;
- The content property can be used on the Before/after pseudo-class of any element to insert the generated content.
Iv. Application questions (10 points per topic, total 40 points):
- Write a Clearfix class in the most concise way to clear the float:
. . clearfix:before,.clearfix:after {content: ""; display:table; };
. clearfix:after {Clear:both; Overflow:hidden; } ;
. clearfix {zoom:1;} /* for IE6 & IE7 */
- Illustrates the difference between 5 block-level elements and inline elements:
1.
2. By default, block-level element width automatically fills its parent element width, in-line elements
- Exclusive line with another row
- Aspect property is valid or not
- In the same row as the adjacent element or not
- Supplement the code so that the multiline text inside the container is centered around the top and bottom:
Html:
<div>
<p></p>
</div>
Css:
div{
display:table;
}
p{
[Supplemental Code]
}
Supplemental code: Display:table-row;
- Find 5 errors in the code and correct them with the same semantics:
div{
Width:auto;
Height:none;
Line-height:1;
text-align:justify;
Display:table-caption;
Position:none;
Visibility:show;
Verticle-align:center;
List-style:point;
}
Correct:
height:0;
position:static;
visibility:visible;
List-style:: disc;
Cursor:point;
Five, additional questions (10 points per topic, total 20 points):
- Use pure CSS to achieve an auto-toggle slideshow Effect:
- #wrap {
- position:relative;
- width:300px;
- height:200px;
- }
- . a,.b{
- Position:absolute;
- left:0;
- top:0;
- One. width:100%;
- height:100%;
13.}
a{.
- Background: #f00;
- Opacity:1;
- -webkit-animation:show 6s linear 0s infinite normal both;
18.}
b{.
- Background: #ff0;
- Opacity:1;
- -webkit-animation:show 6s linear 3s infinite normal both;
23.}
@-webkit-keyframes show{
- 25.0%,20%{
- Opacity:1;
- 27.}
- 28.40%,60%{
- opacity:0;
- 30.}
- 31.80%,100%{
- Opacity:1;
- 33.}
34.}
<div id= "Wrap" >
- <div class= "a" ></div>
- Panax <div class= "B" ></div>
- 38.
- 39.
-</div>
- 41.
42. Write a form that requires the following:
1). Click the button to submit automatically
2). Form request Type is post
3). Form submission Parameters: Account, password, captcha
4). Check if the element is empty using the HTML5 self-band property
<form action= "/" method= "post" "There seems to be a bunch of that. What is the setting code or what? >
<label for= "Account" >account:</label>
<input type= "text" name= "account" id= "account" required/>
<label for= "Password" >account:</label>
<input type= "password" name= "password" id= "password" required/>
<label for= "Captcha" >account:</label>
<input type= "text" name= "Captcha" id= "Captcha" required/>
<input value= "Submit" type= "Submit"/>
</form>
Front End Learning-quiz paper