基本的mediaQuery写法,不复习又忘记了

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>media</title>
</head>
<body>
<link media="screen and (max-width:600px)" rel="stylesheet" type="text/css" href="query.css"/>
<style>
/*
    复习了流媒体查询 
    知识点1:
    @media all and (max-width:800px){}
    知识点2:
    media="screen and (max-width:600px)"
*/
body{
    margin:0;
}
@media all and (max-width:800px){
    p{
        display:inline-block;
        width:30%;
        padding:0;
        margin:0;
    }    
}
</style>
<p>ppppppppppppp</p>
<p>ppppppppppppp</p>
<p>ppppppppppppp</p>
<div>
    <div>
        divContant
    </div>
</div>
<div>
</body>
</html>

 

你可能感兴趣的:(query)