0

背景がテキストの上にある理由がわかりません..何か助けていただければ幸いです..

THX

 html


<body>
...
<img...>
    <div>
        <div> 
       drop down list
         <div>
    <div>

body>img{

ここに背景オプションがあります。高さと幅を調整したい
/* 背景を塗りつぶすルールを設定します */ min-height: 100%; 最小幅: 1024px;

              /* Set up proportionate scaling */
              width: 100%;
              height: auto;

              /* Set up positioning */
              position: fixed;
              top: 0;
              left: 0;
            }




            #wrap{
                max-width: 1000px;
                margin: 20px 0px;
                display:-webkit-box;
                -webkit-box-flex: 1;
                padding-top: 30px;
            }


            /* link styles und so */
            a:hover{
                cursor:pointer;
            }

            a{
                text-decoration: none;
                font-family: 'Sintony', sans-serif;
                color:black;
            }


            /* drop down list */

            .clear{
                clear:both;
            }

            ul#nav{
                list-style-type: none;
                padding: 0;
                margin-top:60px;

            }

            ul#nav li{
                background-color: white;
                float:left;
            }

            ul#nav li a{
                display:block;
                padding: 5px 10px;
                color:#000;
                text-decoration: none;
                border-bottom: 1px solid #ccc;
                list-style-type: none;
            }


            ul#nav li a:hover{
                background-color: #aaa;
            }

            ul#nav li ul li{
                float: none;
                list-style-type: none;
            }

            ul#nav li ul{
                position: absolute;
                display:none;
            }

            ul#nav li:hover ul{
                display: block;
            }
4

1 に答える 1

0

CSS を使用して背景を設定する

body { background-image:url('yourfilepath'); 背景色:#cccccc; }

background-image 要素を使用せずに img 要素を使用する場合は、z-index プロパティを使用する必要があります。ここであなたはそれで遊ぶことができます。

例: http://www.w3schools.com/cssref/tryit.asp?filename=trycss_zindex

于 2013-05-11T15:15:39.417 に答える