在Google Chrome中加载图片的问题

时间:2016-03-20 14:29:55

标签: javascript html css google-chrome

面对在Chrome浏览器中加载图片的问题,而它在Firefox中工作正常。我正在尝试加载和图像在标题和两个按钮上的其他两个。使用以下代码。

header {
    width: 100%;
    min-height: 4em;
    background: url(https://mycrm.com/browser/images/CNT2528706.png) no-repeat top right;
    background-size: cover;
    border-bottom: thin solid #dedede
}

a.button {
    display: block;
    min-height: 50px;
    line-height: 20px;
    background: #f99752 url(https://mycrm.com/browser/images/CNT2532535.png) no-repeat 5px center;
    font-size: 13px;
    color: #fff;
    padding: 0 10px 0 60px;
    border-radius: 5px
}

1 个答案:

答案 0 :(得分:0)

尝试使用此代码:

 header {
    width: 100%;
    min-height: 4em;
    background: url("https://mycrm.com/browser/images/CNT2528706.png") no-repeat top right;
    background-size: cover;
    border-bottom: thin solid #dedede;
}

a.button {
    display: block;
    min-height: 50px;
    line-height: 20px;
    background: url("https://mycrm.com/browser/images/CNT2532535.png") no-repeat 5px center;
    font-size: 13px;
    color: #fff;
    padding: 0 10px 0 60px;
    border-radius: 5px;
}

请勿忘记结束使用;否则代码将无效,也请使用""赞:background:url("示例");