Summary of front-end interview questions
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?
HTML5 new input input type:
email type
url type
number type provides the function of selecting numbers, in which the min attribute is set to the minimum Value, the max attribute sets the maximum value, the value attribute sets the current value, and the step attribute sets the value for each increase.
range type, indicating the range field that limits numeric input
Date and time type :date,month,week,time,datetime,datetime-local
search type
tel type
##color type
HTML5 new form element
datalist specifies the option list of the input field
keygen provides a Reliable way to authenticate users
output is used for different types of output
There are more details that are not listed here. Please read this blog
##2. What is the difference between input and textarea?
- is a single-line text box.
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!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

Frequently Asked Questions and Solutions for Front-end Thermal Paper Ticket Printing In Front-end Development, Ticket Printing is a common requirement. However, many developers are implementing...

JavaScript is the cornerstone of modern web development, and its main functions include event-driven programming, dynamic content generation and asynchronous programming. 1) Event-driven programming allows web pages to change dynamically according to user operations. 2) Dynamic content generation allows page content to be adjusted according to conditions. 3) Asynchronous programming ensures that the user interface is not blocked. JavaScript is widely used in web interaction, single-page application and server-side development, greatly improving the flexibility of user experience and cross-platform development.

There is no absolute salary for Python and JavaScript developers, depending on skills and industry needs. 1. Python may be paid more in data science and machine learning. 2. JavaScript has great demand in front-end and full-stack development, and its salary is also considerable. 3. Influencing factors include experience, geographical location, company size and specific skills.

How to merge array elements with the same ID into one object in JavaScript? When processing data, we often encounter the need to have the same ID...

Learning JavaScript is not difficult, but it is challenging. 1) Understand basic concepts such as variables, data types, functions, etc. 2) Master asynchronous programming and implement it through event loops. 3) Use DOM operations and Promise to handle asynchronous requests. 4) Avoid common mistakes and use debugging techniques. 5) Optimize performance and follow best practices.

Discussion on the realization of parallax scrolling and element animation effects in this article will explore how to achieve similar to Shiseido official website (https://www.shiseido.co.jp/sb/wonderland/)...

In-depth discussion of the root causes of the difference in console.log output. This article will analyze the differences in the output results of console.log function in a piece of code and explain the reasons behind it. �...

Explore the implementation of panel drag and drop adjustment function similar to VSCode in the front-end. In front-end development, how to implement VSCode similar to VSCode...
