媒体查询的引入方式和语法
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-heig