iPhone中未显示背景图片

时间:2018-12-28 11:49:17

标签: html css html5 css3

我发现我的背景图片没有显示在iPhone上。但是,它在android设备中完美运行。请在这方面帮助我。我正在使用视差效果。

HTML部分:

<script type="text/javascript">

    var sizes = [];
    sizes.push({ "Key": "key1", "Value": "value1" });
    sizes.push({ "Key": "key2", "Value": "value2" });
    sizes.push({ "Key": "key3", "Value": "value3" });
    $.ajax({
        type: "POST",
        url: '/YourController/AddProductToDB',
        data: JSON.stringify({
            sizeList: sizes
        }),
        contentType: "application/json; charset=utf-8",
        dataType: "json",
        success: function (msg) {
        alert("success");
        },
        error: function (XMLHttpRequest, textStatus, errorThrown) {
            alert("Status: " + textStatus); alert("Error: " + errorThrown);
        }
    });

</script>

CSS部分:

<section id="showcase">
<div class="container text-center">
  <div class="home-search p-5">
    <div class="overlay p-5">

1 个答案:

答案 0 :(得分:0)

请尝试这个。

#showcase {
  background: url(../img/showcase.jpg);
   background-repeat:no-repeat;
   background-position:top center;
   background-size:cover;
  position: relative;
  min-height: 650px;
  color: #fff;
  padding-top: 6rem; }