兩種方式:
- 外鏈
<link type="text/css" rel="stylesheet" href="link.css" media="only screen and (max-width:480px)"/>
- 內聯
<style>
@media screen and (min-width:480px){
body{
background-color:blue;
}
}
</style>
兩種方式:
<link type="text/css" rel="stylesheet" href="link.css" media="only screen and (max-width:480px)"/>
<style>
@media screen and (min-width:480px){
body{
background-color:blue;
}
}
</style>
https://www.bilibili.com/video/BV1k8411575T/?vd_source=d68ed178f151e80fea1e02efd205802c