Media query in CSS3_html/css_WEB-ITnose
In the past few days, I have been reading CSS3 on MOOC.com, which is very detailed.
The address is here: http://www.imooc.com/code/1405
Take notes:
1. Media query in css3
1. In CSS3 10 media query types
value Device type
all All devices (requires familiarity)
screen Screen display (needs familiarity)
print Print paper or print preview view (requires Familiar)
braille Braille tactile feedback device for the blind
embossed Braille printer
handheld Portable device
projection Various projection devices
speech Speech or audio synthesizer
tv TV type Device
tty Media that uses a fixed density letter grid, such as teletypewriters and terminals
2. Reference methods for common 3-fold media types
① link method
<link rel="stylesheet" type="text/css" href="style.css" media="screen" />
@importurl(reset.css) screen;
③ @media method
<style type="text/css"> @media screen{ 选择器{/*你的样式代码写在这里…*/}}</style>
3 . How to use media queries
@media media type and (media properties) {your style}
Media type: the 10 mentioned above
Media properties: max-width:400px Maximum width
🎜>
②Exclude a certain device
/*用and连接*/@media screen and (min-width:600px) and (max-width:900px){ body {background-color:#f5f5f5;}}
2. Response Layout skills in style design
/*用not*/@media not print and (max-width: 1200px){ 样式代码}/*上面代码表示的是:样式代码将被使用在除打印设备和设备宽度小于1200px下所有设备中。*/
First, try to use as few irrelevant divs as possible;
Second, don’t use inline elements (inline);
/*用only*/<linkrel="stylesheet" media="only screen and (max-device-width:240px)" href="android240.css" />
Fourth, discard useless absolute positioning and floating styles;
Fifth, abandon any redundant structures and do not use 100% settings.
Sixth, try to use H5 meaningful tags
What kind of layout or HTML structure is simple and clean
? Here I will teach you a quick test method.
You first disable all styles in your page (and information related to styles
) and open it in the browser. If your content
is arranged in an orderly manner and is easy to read, then your The structure
won’t be any worse.

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

AI Hentai Generator
Generate AI Hentai for free.

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



The article discusses the HTML <progress> element, its purpose, styling, and differences from the <meter> element. The main focus is on using <progress> for task completion and <meter> for stati

The article discusses the HTML <datalist> element, which enhances forms by providing autocomplete suggestions, improving user experience and reducing errors.Character count: 159

The article discusses the HTML <meter> element, used for displaying scalar or fractional values within a range, and its common applications in web development. It differentiates <meter> from <progress> and ex

The article discusses the viewport meta tag, essential for responsive web design on mobile devices. It explains how proper use ensures optimal content scaling and user interaction, while misuse can lead to design and accessibility issues.

HTML is suitable for beginners because it is simple and easy to learn and can quickly see results. 1) The learning curve of HTML is smooth and easy to get started. 2) Just master the basic tags to start creating web pages. 3) High flexibility and can be used in combination with CSS and JavaScript. 4) Rich learning resources and modern tools support the learning process.

The article discusses the <iframe> tag's purpose in embedding external content into webpages, its common uses, security risks, and alternatives like object tags and APIs.

HTML defines the web structure, CSS is responsible for style and layout, and JavaScript gives dynamic interaction. The three perform their duties in web development and jointly build a colorful website.

AnexampleofastartingtaginHTMLis,whichbeginsaparagraph.StartingtagsareessentialinHTMLastheyinitiateelements,definetheirtypes,andarecrucialforstructuringwebpagesandconstructingtheDOM.
