Html CSS边框图像不工作

Html CSS边框图像不工作,html,css,Html,Css,我目前正在尝试使用CSS的边框图像将自定义边框应用于div。我觉得我拥有所有正确的代码,但我的图像没有显示为边框。有人能看看这个html/css代码,告诉我我做错了什么吗 HTML: <div id="box"> &nbsp; </div> body { text-Align: center; } /* CENTER ALIGN FOR IE */ #PC_Attack_Lightbox { /*** CENTER ALIGN BOX ***/

我目前正在尝试使用CSS的边框图像将自定义边框应用于div。我觉得我拥有所有正确的代码,但我的图像没有显示为边框。有人能看看这个html/css代码,告诉我我做错了什么吗

HTML:

<div id="box">
&nbsp;
</div>
   body { text-Align: center; } /* CENTER ALIGN FOR IE */

#PC_Attack_Lightbox {

  /*** CENTER ALIGN BOX ***/
  text-Align: left;
  margin: 0 auto;

  /*** SET WIDTH & HEIGHT ***/
  width: 500px;
  height: 500px;

  background: #EBF5FF; /* SET BG */

  /*** APPLY BORDER-IMAGE ***/
    border:35px outset brown;
    -moz-border-image:url(img/wood2.jpg) 25 30 10 20 repeat;
    -webkit-border-image:url(img/wood2.jpg) 25 30 10 20 repeat;
    border-image:url(img/wood2.jpg) 25 30 10 20 repeat;
}

因为您在#PC(攻击)Lightbox上使用box div和编写css 因此,请使用PC_攻击_Lightbox

<div id="PC_Attack_Lightbox">
&nbsp;
</div>​

//你的代码在这里
正文{文本对齐:居中;}/*IE的居中对齐*/
#PC_攻击_灯箱{
/***中心对齐框***/
文本对齐:左对齐;
保证金:0自动;
/***设置宽度和高度***/
宽度:500px;
高度:500px;
背景:#EBF5FF;/*设置背景*/
/***应用边框图像***/
边框:35px棕色;
-moz边框图片:url(img/wood2.jpg)25 30 10 20重复;
-webkit边框图片:url(img/wood2.jpg)25 30 10 20重复;
边框图片:url(img/wood2.jpg)25 30 10 20重复;
}

好吧,我不明白这一点(我责备大脑放屁)。在我看来,我的ID和css选择器是一样的。您的边框图像样式为
\PC\u Attack\u Lightbox
,因此请将您的div映射到
div ID=“PC\u Attack\u Lightbox”
。谢谢。你的评论起了作用。
<div id="PC_Attack_Lightbox">

// your code here

</div>

body { text-Align: center; } /* CENTER ALIGN FOR IE */

#PC_Attack_Lightbox {

  /*** CENTER ALIGN BOX ***/
  text-Align: left;
  margin: 0 auto;

  /*** SET WIDTH & HEIGHT ***/
  width: 500px;
  height: 500px;

  background: #EBF5FF; /* SET BG */

  /*** APPLY BORDER-IMAGE ***/
    border:35px outset brown;
    -moz-border-image:url(img/wood2.jpg) 25 30 10 20 repeat;
    -webkit-border-image:url(img/wood2.jpg) 25 30 10 20 repeat;
    border-image:url(img/wood2.jpg) 25 30 10 20 repeat;
}