html – 无法在Bootstrap按钮上添加图像到文本

html – 无法在Bootstrap按钮上添加图像到文本,第1张

概述我正在使用Bootstrap,有时很难覆盖它.我想在我的按钮附近添加一些图片,靠近文本.所以我添加了背景图片,但它不适用. 这是我的按钮的CSS: .submit .report{font-size: 18px;text-shadow: none;font-weight: bold;padding: 5px;width:300px;color:white;filter:alpha(o 我正在使用bootstrap,有时很难覆盖它.我想在我的按钮附近添加一些图片,靠近文本.所以我添加了背景图片,但它不适用.
这是我的按钮的CSS:

.submit .report{Font-size: 18px;text-shadow: none;Font-weight: bold;padding: 5px;wIDth:300px;color:white;filter:Alpha(opacity=100);background: #628d28;background-image:url('../images/picture.png') no-repeat;}

但FireBUG说,我的元素有下一个CSS:

.submit .report{Font-size: 18px;text-shadow: none;Font-weight: bold;padding: 5px;wIDth:300px;color:white;filter:Alpha(opacity=100);background-image: none repeat color(98,141,40);}

为什么我无法添加背景图片?

解决方法 您定义了错误的背景属性.像这样写:

.submit .report{background-color: #628d28;background-image:url('../images/picture.png');background-repeat:no-repeat;}

要么

.submit .report{    background: #628d28 url('../images/picture.png') no-repeat; }
总结

以上是内存溢出为你收集整理的html – 无法在Bootstrap按钮上添加图像到文本全部内容,希望文章能够帮你解决html – 无法在Bootstrap按钮上添加图像到文本所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/web/1059132.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-25
下一篇 2022-05-25

发表评论

登录后才能评论

评论列表(0条)

保存