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:
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
<link rel="stylesheet" type="text/css" href="style.css" media="screen" />
@importurl(reset.css) screen;
<style type="text/css"> @media screen{ 选择器{/*你的样式代码写在这里…*/}}</style>
@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下所有设备中。*/
Second, don’t use inline elements (inline);
/*用only*/<linkrel="stylesheet" media="only screen and (max-device-width:240px)" href="android240.css" />
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.