从纵向css移动到横向css移动时需要刷新页面



我有一个网站,当它出现在一个小型智能手机(人像)上时,徽标太大了,我想把它换成一个较小的图像。

我可以做到这一点,没有问题,感觉很有智慧,但当投注者拿着手机时,它会回到大图像,我很高兴,但当下注者拿着电话肖像时,大图像仍然存在,直到页面刷新。

我该怎么办才能拥有它,这样玩家在将手机从横向切换到纵向后就不需要刷新页面了。

我在下面附上我当前的片段。它来自.css页面。请注意,我也尝试过将这个片段添加到.css页面的前几行代码中,但没有什么不同。图像替换仅为10kb

/*+-+-+-+-++-+-+-+-++-+-+-+/-+-+-+-+/-+-+-+-++

/* Samsung Galaxy S2 (portrait) ----------- */
@media only screen and (max-device-width: 320px) and (orientation :     portrait) {
.phonenum {
display: none; 
}
.two-column-column1 .hide-logo {
display: none !important;
}
.two-column-column1 {
width:274px; /*width of my new small image image*/
height:74px; /*height of my new small image image*/
background: url(images/londonfabriccompany274-74.png) no-repeat;
margin:0; /* I didn't want no margin */
padding:0; /* I didn't want padding either */
}
.inner-one-columns-wrapper {
margin-top: 6px;
}
}
/* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+- */

感谢您的输入欢呼

Seemore Yea Baby

您是否尝试在媒体查询中添加横向参数,并围绕该媒体查询设置相同的图像要求?

/*三星Galaxy S2(人像)---------------*/

@仅媒体屏幕和(最大设备宽度:320px)和(方向:纵向){

/**此处显示您的参数**/}

然后:

@仅媒体屏幕和(最小设备宽度:320px)和(最大设备高度:640px)以及(方向:横向){

/**此处显示您的参数**/

}

最新更新