【问题标题】:Can't get background color working with html border无法使用 html 边框获得背景颜色
【发布时间】:2016-08-16 21:33:49
【问题描述】:

我正在使用此代码:

<div style="width:850px;height:50px;padding:6px;border-width:4px;border-color:black;border-style:dotted hidden dotted hidden;margin-left: auto;margin-right: auto;">
<center><b>Net Worth:</B> <font color="green">€341,134.00</font> | <b>Distance Driven: </b><font color="lightgrey">10,610km</font> | <b>Employee Count:</b><font color="lightgrey"> 3</font></center></div>

但由于某种原因,我一加入我的网站就出现在我的网站上

background-color: rgba(0,0,0,.5);

<div style="width:850px;height:50px;padding:6px;border-width:4px;border-color:black;border-style:dotted hidden dotted hidden;margin-left: auto;margin-right: auto;background-color: rbga(0,0,0,.6);">
<center><b>Net Worth:</B> <font color="green">€341,134.00</font> | <b>Distance Driven: </b><font color="lightgrey">10,610km</font> | <b>Employee Count:</b><font color="lightgrey"> 3</font></center></div>

我的边框消失并且没有背景。但它在除此站点之外的其他任何地方都可以使用。为什么?我什至尝试只使用“背景:rbga(0,0,0,.6);”

【问题讨论】:

    标签: html colors background border


    【解决方案1】:

    你写的是 rbga 而不是 rgba 。你的网站是这样的吗?

    【讨论】:

    • 从未注意到。应该没关系吧?但是,是的,这是同一回事。横幅只是消失了,没有背景颜色大声笑
    猜你喜欢
    • 2022-01-03
    • 1970-01-01
    • 2015-07-05
    • 2017-07-01
    • 2013-09-21
    • 2011-09-12
    • 2013-06-09
    • 2018-10-28
    • 1970-01-01
    相关资源
    最近更新 更多