search
HomeWeb Front-endHTML TutorialFront-end advanced test questions css_html/css_WEB-ITnose

1. css 40 points

1. What is a box model? 2. How many types of Doctype are there? 3. How to lay out a two-column layout where the left side does not move and the right side adapts?

4. How to layout two columns of equal height? 5. How to make the layout with a fixed width on the right side and adaptive width on the left or middle?

6. How to layout three columns adaptively? 7. What is the difference between gif, png and jpg? 8. What is css sprite? What are its advantages and disadvantages? 10. Make thin line tables? 11. What are the differences and connections between position: relative, absolute, and fixed? 12. How to center a float:left element

13. How do you usually solve the compatibility issues of Css in various browsers? Please share your experience;

" -//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"

DOCTYPE html PUBLIC "-// W3C//DTD -//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd"

DOCTYPE html

Third, you can refer to Baidu Netdisk

Left column, float: left width: 300px;

Right column, margin-left: 300px;

Four, five, and six are all layouts. . .

7, gif, png, jpg

1. The excellent compression algorithm ensures image quality to a certain extent while reducing the size to a very small size.

2. Multiple frames can be inserted to achieve animation effects.

3. You can set a transparent color to create the effect of objects floating on the background.

png

* Supports 256-color palette technology to produce small files

* Supports up to 48-bit true color images and 16-bit grayscale images.

* Supports the translucency of Alpha channel.

* Supports gamma correction information for image brightness.

* Supports storing additional text information to retain image name, author, copyright, creation time, comments and other information.

* Use lossless compression.

* Asymptotic display and streaming reading and writing are suitable for quickly displaying the preview effect during network transmission and then displaying the full picture.

* Use CRC cyclic redundancy encoding to prevent file errors.
* The latest PNG standard allows multiple images to be stored in one file.

jpg

JPEG/JFIF is the most commonly used format for storing and transmitting photos on the World Wide Web. JPEG can achieve its best results in photos or realistic paintings with smooth changes in tone and color. In this case, it usually does better than a completely distortion-free approach, and can still produce a very good-looking image (in fact it will produce a higher quality image than other general methods like GIF, which is better for line drawings) The graphics (drawing) and illustrations are distortion-free, but full-color images require extremely difficult quantification).






Simple gif is small in size and can be compatible with ie6 without filters, but the color is a bit different


png, large in size and good in color , the filter needs to be compatible with IE6

jpg, choose the color by yourself, the better color will be larger in size, opaque

The big list above is for artists, Look at the design! This is all it takes for the front end to be OK

8 What is css sprite? Advantages and disadvantages?

It is the css sprite

CSS Sprites advantages and disadvantages

Advantages

1. Using CSS Sprites can greatly reduce the http requests of web pages, thereby greatly improving the performance of the page. This is also the biggest advantage of CSS Sprites and the main reason why it is widely spread and applied;

2. CSS Sprites can reduce the bytes of images. I have compared the bytes of merging three images into one image many times and the bytes are always smaller than the sum of the bytes of these three images.

3. It solves the problem of web designers in naming pictures. They only need to name a collection of pictures. There is no need to name each small element. This improves the efficiency of web page production.

4. It is easy to change the style. You only need to modify the color or style of the picture on one or a few pictures, and the style of the entire web page can be changed. Maintenance is more convenient.

Disadvantages

It is true that CSS Sprites are so powerful, but there are also some shortcomings that cannot be ignored, as follows:

1. When merging pictures, you should merge multiple pictures into one picture in an orderly and reasonable manner, and leave enough space to prevent unnecessary backgrounds in the section; These are okay, but the most painful thing is the adaptive page under widescreen and high-resolution screens. If your picture is not wide enough, it is easy for the background to break;

2. CSS Sprites are troublesome to develop. You have to measure and calculate the precise position of each background unit through photoshop or other tools. This is needlework, not difficult, but very tedious. Fortunately, Tencent’s ghost brother developed a CSS Sprites using ADOBE AIR. Although the style generation tool is still a little inflexible in use, it is much more convenient than photoshop measurement, and the style can be directly generated, copied, and copied!

3. CSS Sprites are more troublesome to maintain. If there is a slight change in the page background, you usually need to change the merged image. It is best not to touch the areas that do not need to be changed. This way Avoid changing more css. If it cannot fit in the original place, you can only (preferably) add the image down. In this way, the bytes of the image will increase, and the css must be changed.

4. CSS Sprites are worth learning and applying, especially if the page has a bunch of icons. In short, many times we have to weigh the pros and cons before deciding whether to use CSS Sprites.

十 border-collapse:collapse

Eleven What are the differences and connections between position:relative,absolute,fixed?

Relative, absolute, floating. . . I’ve basically used it before and I won’t introduce it.

How to center a float:left element

margin-left:50%;  position:relative; left:width除2 。。。这个方法是我想的笨办法,如果有更好的可以提出 Css在各浏览器下的兼容问题你通常是怎么来解决的,请分享你的经验;hack。。。页面的规范!。。。好吧这玩意已经变成一种习惯了。。。基本一次成型怎木办IE6滤镜css3的部分属性兼容ie6,pie.js

Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
The Future of HTML, CSS, and JavaScript: Web Development TrendsThe Future of HTML, CSS, and JavaScript: Web Development TrendsApr 19, 2025 am 12:02 AM

The future trends of HTML are semantics and web components, the future trends of CSS are CSS-in-JS and CSSHoudini, and the future trends of JavaScript are WebAssembly and Serverless. 1. HTML semantics improve accessibility and SEO effects, and Web components improve development efficiency, but attention should be paid to browser compatibility. 2. CSS-in-JS enhances style management flexibility but may increase file size. CSSHoudini allows direct operation of CSS rendering. 3.WebAssembly optimizes browser application performance but has a steep learning curve, and Serverless simplifies development but requires optimization of cold start problems.

HTML: The Structure, CSS: The Style, JavaScript: The BehaviorHTML: The Structure, CSS: The Style, JavaScript: The BehaviorApr 18, 2025 am 12:09 AM

The roles of HTML, CSS and JavaScript in web development are: 1. HTML defines the web page structure, 2. CSS controls the web page style, and 3. JavaScript adds dynamic behavior. Together, they build the framework, aesthetics and interactivity of modern websites.

The Future of HTML: Evolution and Trends in Web DesignThe Future of HTML: Evolution and Trends in Web DesignApr 17, 2025 am 12:12 AM

The future of HTML is full of infinite possibilities. 1) New features and standards will include more semantic tags and the popularity of WebComponents. 2) The web design trend will continue to develop towards responsive and accessible design. 3) Performance optimization will improve the user experience through responsive image loading and lazy loading technologies.

HTML vs. CSS vs. JavaScript: A Comparative OverviewHTML vs. CSS vs. JavaScript: A Comparative OverviewApr 16, 2025 am 12:04 AM

The roles of HTML, CSS and JavaScript in web development are: HTML is responsible for content structure, CSS is responsible for style, and JavaScript is responsible for dynamic behavior. 1. HTML defines the web page structure and content through tags to ensure semantics. 2. CSS controls the web page style through selectors and attributes to make it beautiful and easy to read. 3. JavaScript controls web page behavior through scripts to achieve dynamic and interactive functions.

HTML: Is It a Programming Language or Something Else?HTML: Is It a Programming Language or Something Else?Apr 15, 2025 am 12:13 AM

HTMLisnotaprogramminglanguage;itisamarkuplanguage.1)HTMLstructuresandformatswebcontentusingtags.2)ItworkswithCSSforstylingandJavaScriptforinteractivity,enhancingwebdevelopment.

HTML: Building the Structure of Web PagesHTML: Building the Structure of Web PagesApr 14, 2025 am 12:14 AM

HTML is the cornerstone of building web page structure. 1. HTML defines the content structure and semantics, and uses, etc. tags. 2. Provide semantic markers, such as, etc., to improve SEO effect. 3. To realize user interaction through tags, pay attention to form verification. 4. Use advanced elements such as, combined with JavaScript to achieve dynamic effects. 5. Common errors include unclosed labels and unquoted attribute values, and verification tools are required. 6. Optimization strategies include reducing HTTP requests, compressing HTML, using semantic tags, etc.

From Text to Websites: The Power of HTMLFrom Text to Websites: The Power of HTMLApr 13, 2025 am 12:07 AM

HTML is a language used to build web pages, defining web page structure and content through tags and attributes. 1) HTML organizes document structure through tags, such as,. 2) The browser parses HTML to build the DOM and renders the web page. 3) New features of HTML5, such as, enhance multimedia functions. 4) Common errors include unclosed labels and unquoted attribute values. 5) Optimization suggestions include using semantic tags and reducing file size.

Understanding HTML, CSS, and JavaScript: A Beginner's GuideUnderstanding HTML, CSS, and JavaScript: A Beginner's GuideApr 12, 2025 am 12:02 AM

WebdevelopmentreliesonHTML,CSS,andJavaScript:1)HTMLstructurescontent,2)CSSstylesit,and3)JavaScriptaddsinteractivity,formingthebasisofmodernwebexperiences.

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Tools

MinGW - Minimalist GNU for Windows

MinGW - Minimalist GNU for Windows

This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.

SAP NetWeaver Server Adapter for Eclipse

SAP NetWeaver Server Adapter for Eclipse

Integrate Eclipse with SAP NetWeaver application server.

Dreamweaver Mac version

Dreamweaver Mac version

Visual web development tools

EditPlus Chinese cracked version

EditPlus Chinese cracked version

Small size, syntax highlighting, does not support code prompt function

Safe Exam Browser

Safe Exam Browser

Safe Exam Browser is a secure browser environment for taking online exams securely. This software turns any computer into a secure workstation. It controls access to any utility and prevents students from using unauthorized resources.