我不能让这个背景出现在div中

时间:2010-02-24 10:38:08

标签: javascript css background

有人能指出我正确的方向吗?我不明白为什么我不能将achtergrond_homepage.png作为圆角的背景。

编辑:看起来灰色总是在所有东西之上。它可以在javascript部分控制吗?

这是css:

   @charset "utf-8";
   /* CSS Document */

    html, body {
    color: #444141;
    font-family: 'trebuchet ms' !important;
    font-size: 12px;
    margin: 0px;
    padding: 0px;
    height: 100%;
    background: #eaeade;}
    .justyParagraph {
    text-align: justify;}
    a img {
    border: 0;}
    .clearer {
    clear: both;}


    .rounded_corners{
            background: url(../images/achtergrond_homepage.png) no-repeat left bottom;
            color:#FFF;
            padding: 8px;
            width: 380px;
            border: 2px solid #4e4b4b;
            height: 450px;

                    }

    div#blockdark {
        height: 517px;
        left: 450px;
        position: absolute;
        top: 130px;
        z-index: 1000000;
        width: 360px;
        visibility: visible;


    }

这是HTML

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">

    <title>Test</title>
    <link rel="bookmark" href="/favicon.ico" />
    <link rel="shortcut icon" href="/favicon.ico" />
    <link href="css/style.css" rel="stylesheet" type="text/css" />
            <script src="js/excanvas.js" type="text/javascript"></script>
            <script src="js/jQuery.min.js" type="text/javascript"></script>
            <script src="js/roundCorners.jQuery.js" type="text/javascript" ></script>    

            <script type="text/javascript">
              $(window).load(function(){
                $('.rounded_corners').bg(['20px', '20px', '20', '20']);
            });
            </script>
</head>

<body>
<div id="blockdark"> 
<div class="rounded_corners">

 <div>   <h1> Title </h1> </div>

 <div> Content </div>


</div>
</div>
</body>
</html>

这是一个例子,也许它与圆角的javascript有关?

http://www.coldcharlie.nl/test/

1 个答案:

答案 0 :(得分:0)

尝试将display: block添加到.rounded_corners。此外,您似乎错过;background

中的.rounded_corners