1、媒体查询的语法
媒体查询的语法: @media mediaType and (media feather) { 选择器 { 属性名:属性值 } } 多个条件: @media mediaType and (media feather) and (media feather){ 选择器 { 属性名:属性值 } } mediaType:设备类型 media feather:媒体特性表表达式 1.mediaType设备类型: all:所有的多媒体设备 print:打印机或打印预览 screen:电脑屏幕、平板电脑、智能手机等 speech:屏幕阅读器等发声设备 2.media feather:媒体特性表达式 width:浏览器的宽度 height:浏览器的高度 max-width:最大宽度 min-width:最小宽度 device-width:设备宽度 device-height:设备高度 max-device-width:最大设备宽度 min-device-width:最小设备宽度 orientation:设备的窗口朝向 1.横屏 宽度比高度大 orientation:landscape; 2.竖屏 高度比宽度大 orientation:portrait; 3.操作符 - and(与、和) not: not是用来排除掉某些特定的设备的,比如 @media not print(非打印设备) only: