Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Share web front-end interview questions

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/02 Report--

This article mainly explains "sharing web front-end interview questions". The content of the article is simple and clear, and it is easy to learn and understand. Please follow the editor's train of thought to study and learn "sharing web front-end interview questions".

What's the difference between using link and @ import when importing styles into a page?

Answer: difference 1: essential difference: link belongs to the XHTML tag, while @ import is entirely a way provided by CSS.

Difference 2: difference in loading order: when a page is loaded (that is, when browsed by the viewer), the CSS referenced by link will be loaded at the same time, while the CSS referenced by @ import will wait until the page has been downloaded before it is loaded. So sometimes there is no style (that is, flickering) when browsing the page where @ import loads CSS, which is obvious when the network speed is slow.

Difference 3: compatibility difference: @ import is proposed by CSS2.1, so old browsers do not support it. @ import can only be recognized by those above IE5, while the link tag does not have this problem.

Difference 4: the difference when using dom (document o bject model document object Model) to control styles: when using javascript to control dom to change styles, you can only use link tags, because @ import is not controlled by dom.

What is the difference between the title attribute and the alt attribute on the tag?

Answer: the title attribute is the content displayed by the mouse.

The alt attribute is designed to provide text descriptions to viewers who cannot see the images in your document.

Please write at least 5 new tags for html5 and describe their semantics and application scenarios

Answer: section: define a chapter in the document

Nav: define chapters that contain only navigation links

Header: defines the header of a page or chapter. It often contains logo, page titles, and navigational directories.

Footer: defines the end of a page or chapter. It often contains copyright information, links to legal information, and addresses for feedback suggestions.

Aside: define content that is less relevant to the content of the page-if deleted, the rest of the content is still reasonable.

What is the difference between HTML and XHTML--?

Answer:

HTML elements must be nested correctly.

The XHTML element must be closed.

The signature must be in lowercase letters.

The XHTML document must have a root element.

5. What are the advantages and disadvantages of iframe?

Answer: advantages:

a. Solve the loading problem of slow-loading third-party content such as icons and ads

B. iframe no refresh file upload c. Iframe cross-domain communication

Disadvantages:

A. iframe blocks the Onload event b. Cannot be indexed by some search engines

c. The page increases the server's http request d. Will produce a lot of pages, not easy to manage.

What is the principle of full screen scrolling? Which attributes of CSS are used?

Answer: principle: it is a bit similar to broadcast, where the overall elements are arranged all the time. Suppose there are five full-screen pages to be displayed, then the height is 500%, only 100% is displayed, and the rest can be located on the y-axis through transform or through margin-top.

Overflow:hidden;transition:all 1000ms ease

What is responsive design? What is the basic principle of responsive design? How to be compatible with earlier versions of IE?

Answer: responsive website design (Responsive Web design) is a website that is compatible with multiple terminals, rather than making a specific version for each terminal.

The basic principle is to detect the screen size of different devices through media query.

The header of the page must have a viewport declared by meta.

What is the difference between double colons and single colons in:: before and: after? Explain the role of these two pseudo elements.

Answer: a single colon (:) is used for CSS3 pseudo-classes, and a double colon (::) is used for CSS3 pseudo-elements.

:: before is a pseudo element defined in front of the main content of an element in terms of the existence of a child element. Does not exist in the dom, only in the page.

: before and: after, these two pseudo elements, are new in CSS2.1. At first, the prefix of pseudo elements used single colon syntax, but with the evolution of Web, in the CSS3 specification, the syntax of pseudo elements was modified to use double colons to:: before:: after

How to make Chrome support text less than 12px?

Answer: P {font-size:10px;-webkit-transform:scale (0.8);} / / 0.8 is the scale

Briefly describe your understanding of the semantics of HTML?

Answer: 1. Do the right thing with the right label.

2. Html semantics makes the content of the page structured, the structure is clearer, and it is easy to parse to browsers and search engines.

3. It is displayed in a document format even without style CSS, and it is easy to read

4. Search engine crawlers also rely on HTML tags to determine the context and the weight of each keyword, using SEO

5. Make it easier for people who read the source code to divide the site into blocks, making it easy to read and maintain and understand.

Thank you for your reading, the above is the content of "sharing web front-end interview questions". After the study of this article, I believe you have a deeper understanding of sharing web front-end interview questions, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report