<div class="col-lg-6" >
<img src = "iphone6.png" id="dog-mobile" alt="phone">
</div>
#dog-mobile{
height:600px;
position: absolute;
right: 25%;
transform: rotate(25deg);
}
@media(max-width:1000){
#dog-mobile{
position: static;
transform: rotate(0deg);
}
}<媒体查询不能处理这个图像,低于1000 so的图像应该是静态的,并且应该是直的,但它不是这样的。它还有一个引导类的网格,即-lg-6输出图像截图>
发布于 2022-03-22 07:28:48
请在<head>标签中的HTML页面中添加这一行
<meta name="viewport" content="width=device-width, initial-scale=1">同时更改CSS,如下所示:
#dog-mobile{
height:600px;
position: absolute;
right: 25%;
transform: rotate(25deg);
}
@media screen and (max-width: 1000px) {
#dog-mobile{
position: static;
transform: rotate(0deg);
}
}https://stackoverflow.com/questions/71568242
复制相似问题