Media Query For Tablet And Mobile Code Example
Example 1: media query for mobile view css @ media only screen and ( max - width : 600 px ) { body { background - color : lightblue ; } } Example 2: media query desktop /* Extra small devices (phones, 600px and down) */ @ media only screen and ( max - width : 600 px ) { . . . } /* Small devices (portrait tablets and large phones, 600px and up) */ @ media only screen and ( min - width : 600 px ) { . . . } /* Medium devices (landscape tablets, 768px and up) */ @ media only screen and ( min - width : 768 px ) { . . . } /* Large devices (laptops/desktops, 992px and up) */ @ media only screen and ( min - width : 992 px ) { . . . } /* Extra large devices (large laptops and desktops, 1200px and up) */ @ media only screen and ( min - width : 1200 px ) { . . . } Example 3: media querries for tablets /* ----------- iPad 1, 2, Mini and Air ----------- */ /* Portrait and Landscape */ @ media only screen and ( min - device - width : 768 px...