media query

<html>

<head>
<style type="text/css">
@media only screen and (max-width:1200px){
    #test{
        font-size: 100;
    }
}
@media only screen and (max-width: 800px) {
    #test{
        font-size: 50;
    }
}
</style>
</head>
<body>
    <div id="test">
        <div style="height:2em;background-color:red"/>
    </div>
</body>

</html>

and后面要有空格

你可能感兴趣的:(media query)