【问题标题】:Background in DIV doesn't show up on Samsung tabletDIV 中的背景不会出现在三星平板电脑上
【发布时间】:2017-08-01 04:34:06
【问题描述】:

我正在处理一些 CSS,但我确实注意到应该有问题。 CSS 在桌面版和我的 Sony Xperia Z3 上也能完美运行。 但是,它并没有在我的三星平板电脑上做它应该做的事情。

无论如何这是我的 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 css galaxy-tab


    【解决方案1】:

    我明白了,

    这是因为我的三星平板电脑屏幕非常“浅暗”,所以深色背景颜色很容易消失。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2014-02-25
      • 2016-10-08
      • 1970-01-01
      • 2014-12-13
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多