我正在使用Firefox和Chrome来开发响应式网页。在两种浏览器上,我都更改了css以便在屏幕尺寸低于770px时将元素浮动到左侧。它们的两种响应模式均允许我确认其行为与预期一致,仅在该大小以下才浮动到左侧。
但是,当我使用5英寸(720 x 1280)屏幕的华为P8时,该元素不会向左浮动。
脚本
@include bp(max-width, 770px) {
.products-list .price {
float: left;
}
的CSS
@media only screen and (max-width: 770px)
.products-list .price {
float: left;
}
html
<ul class="products-list">
<li class="items">
<div class="product-info">
<div class="left-product">
<div class="price">
<span class="reg-price">
<span class="price">$1000</span>
为什么会这样呢?
为了确保不是缓存问题,请尝试使用内置于移动设备检查器中的Chrome(适用于Android)或Safari(适用于iOS)通过usb检查移动浏览器。这在我身上经常发生。当我检查设备时,有时页面正在使用旧的缓存样式表。
https://developers.google.com/web/tools/chrome-devtools/debug/remote-debugging/remote-debugging
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句