When I read a responsive design, people always use a seam to use this statement: @media and (max-width :)
But do mobile phones today seem to have excellent resolution (often larger than PCs), the best way to detect small devices?
thank; =)
Screen resolution does not matter. The value used in media queries is the width of the device . For instance:
1280x720 . ( ) 720 , HD, 200%, 360 . , :
/* Even though my phone has a screen width of 720px… */ @media screen and (max-width: 360px) { /* * This code will apply */ } @media screen and (min-width: 361px) { /* * This code will not apply */ }
, , 400 , , .
.
DPI Height Width.
@media(resolution: 326dpi) and (device-width: 640) and (device-height: 1136) { // Iphone 5s }
:
CSS /HD.
viewport . .. <meta name="viewport" content="width=device-width"> - CSS, 100%.
<meta name="viewport" content="width=device-width">
Viewport Device-Widths .
, "" , "" CSS Media.
, , Modernizer, , .