We have shared dozens of css interview questions with you before. In this article, we will share with you a summary of front-end interview questions, hoping to help everyone.
HTML
1. What new content or APIs have been added to html5, and which ones have been used?
##2. What is the difference between input and textarea?
3. Use a p to simulate the implementation of textarea?
- #First we need to know that p is highly adaptive, and the height will increase as the content increases. The textarea has a fixed size. If the height exceeds the specified height, a scroll bar will appear.
- p has an attribute called contenteditable. This can be achieved by setting the contenteditable attribute to true. The content of p is editable.
- #After making the content editable, set the specified height in css and set the overflow-y attribute to auto to realize the scroll bar.
4. How do mobile devices ignore the recognition of numbers on a page as phone numbers?
- Mobile devices often recognize a string of numbers as a phone number. The color and style of the numbers will change. Click to make a direct call.
- #Add the following code to turn off recognition.
<span style="font-size: 14px;"> <meta name = "format-detection" content = "telephone=no"> <br></span>
Copy after login
CSS
1. Left and right layout: fixed width on the left, adaptive on the right, many There are 3 methods
- Method 1: Set the left module to float left, and set the width of the right module to 100%
- Method 2: The parent container sets display: flex; the right part sets flex: 1. display: flex is set to a flexible box, and its sub-elements can set the flex value to control the proportion of the space it occupies.
- #Method 3: Use negative margin. Set the left and right parts to float left, and set the width to 100% for the right part. Set the left margin of the left part to negative 100%. In order to prevent the content of the right part from being covered, add a left margin (the width of the left part) to the right part.
2. What are the new features of CSS3?
- Choose of CSS3 Device
- E:last-child / E :nth-child(n) / E :nth-last-child(n) The nth from the bottom Element
- @Font-face attribute is used to load font styles. It can load server-side fonts and display them to the client, even if the client does not have Install the font
- Rounded corners: border-radius
- Flexible box mode display: flex. Wait for attributes
3.BFC and IFC
Related recommendations:
The latest Baidu front-end interview questions sharing
Web front-end interview questions Track 8 - Absolute positioning and relative positioning
Share some examples of front-end interview questions
The above is the detailed content of Summary of front-end interview questions. For more information, please follow other related articles on the PHP Chinese website!