@media自适应css @media可以更具查询条件(查询条件的true或者false)切换不同的css样式 @media type and (属性) / @media not type and (属性) type screen(屏幕)print(打印机)tty(打字机)等等 属性 widthheightorientation(窗口方向) 举例子: //让768以上1200以下背景变红 @media screen and (min-width:768px) and (max-width:1200px){ body{ background-color:red } }