我正在处理一些 CSS,我确实注意到应该有问题。 CSS 在桌面版和我的 Sony Xperia Z3 上运行完美。 但是,在我的 Samsung 平板电脑上,它没有执行应有的操作。
无论如何,这是我的 CSS。
.normal {
background-image: url('halftone.png');
margin: auto;
padding: 5px;
background-repeat: repeat;
min-height: 100px;
}
.normal1 {
background-image: url('halftone.png');
padding: 5px;
float:left;
margin-bottom: 10px;
background-repeat: repeat;
min-height: 100px;
}
.normal2 {
background-image: url('images/bg.png');
margin-bottom: 10px;
width: auto;
padding: 5px;
float:right;
background-repeat: repeat;
min-height: 100px;
}
#bar {
padding: 5px;
margin-bottom: 10px;
color: #FFFFFF;
font-family: Gotham, "Helvetica Neue", Helvetica, Arial, sans-serif;
font-weight: bolder;
font-size: 16px;
text-align: center;
text-shadow: 0px 0px rgba(0,8,33,1.00);
vertical-align: middle;
background-image: url('images/bar.png');
background-repeat: repeat;
width: auto;
}
所以它没有显示我的背景图片
但有趣的是;这段代码确实有效
#news {
background-image: url('back.png');
background-repeat: repeat;
padding: 5px;
font-size: 15px;
width: auto;
}
HTML 类看起来像
<div class="normal1">
<div id="bar">TITLE HERE</div>
lot's of text
</div>
所以知道我错过了什么吗?
背景图像也没有显示(这只是一张 500px x 500px 的图像,应该重复,就像其他 div 中的图像一样)。仅显示背景颜色。
最佳答案
我明白了,
这是因为我的三星平板电脑屏幕非常“浅暗”,所以深色背景很容易消失。
关于android - DIV 中的背景在三星平板电脑上不显示,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42725027/