作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
在 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
}
最佳答案
尝试使用此代码:
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("Example");
关于javascript - 在 Google Chrome 中加载图像的问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36114966/
我是一名优秀的程序员,十分优秀!