Div背景消失了

时间:2016-02-23 13:15:10

标签: html css

<div style="position: relative;" >
        <div class="Shade" background="wood.jpg" style="position: absolute; top: 17px;   left: 252px; width: 231px; height: 32px; color: #000; font-size: 24px; text-align: center;  border: 1px none #000000;" ><span class="welcome"><span class="goldtext">

                  พบกับผู้สร้างเว็บไซต์

           </span></span></div>

帮助(我不擅长英语)

在dw它的工作中

但是当我在浏览器中测试它已经消失了

现在解决了。谢谢大家

2 个答案:

答案 0 :(得分:0)

这是一个解决方案:  你在错误的地方提到了“背景”财产。 更正后的代码如下:

<div style="position: relative;" >
        <div class="Shade" style="background:url('wood.jpg');position: absolute; top: 17px;   left: 252px; width: 231px; height: 32px; color: #000; font-size: 24px; text-align: center;  border: 1px none #000000;" ><span class="welcome"><span class="goldtext">

                  พบกับผู้สร้างเว็บไซต์

           </span></span></div>
  

确保您的图片文件位于此html代码包含文件所在的目录中

答案 1 :(得分:0)

问题是你需要以风格写出背景

<div style="position: relative;" >
    <div class="Shade"  style="background:url('wood.jpg');position: absolute; top: 17px;   left: 252px; width: 231px; height: 32px; color: #000; font-size: 24px; text-align: center;  border: 1px none #000000;" ><span class="welcome"><span class="goldtext">

              พบกับผู้สร้างเว็บไซต์

       </span></span></div>
相关问题