배경 이미지 위에 배경색 (파란색)을 중첩하려고합니다. 배경색 위에 표시 할 메뉴가 있습니다. z-index 속성을 사용해 보았지만 나에게 적합하지 않습니다. 나는 그것이 메뉴의 속성과 관련이 있다고 확신하지만, 나는 붙어있다. 다른 div 안에 메뉴를 넣으려고했지만 div 치수를 올바로 지정할 수 없습니다.배경색 및 이미지 오버레이
이것은 내 색인 페이지입니다.
<link rel="stylesheet" type="text/css" href="Practice.css">
</head>
<body background="http://localhost/jim/BatikVilla/Background.jpg">
<div id='blue'>
<div id='cssmenu'>
<ul>
<li class='active'><a href='index2.php'>Home</a></li>
<li class='has-sub '><a href='Product.php'>Products</a>
<ul>
<li class='has-sub '><a href='Men.php'>Men</a>
<ul>
<li><a href='Sarong.php'>Sarong</a></li>
<li><a href='Shirt.php'>Shirt</a></li>
<li><a href='MenSlipper.php'>Slipper</a></li>
</ul>
</li>
<li class='has-sub '><a href='Women.php'>Women</a>
<ul>
<li><a href='DarGyi.php'>DarGyi</a></li>
<li><a href='LongDress.php'>Long Dress</a></li>
<li><a href='WomenSlipper.php'>Slipper</a></li>
</ul>
</li>
</ul>
</li>
<li><a href='About.php'>About</a></li>
<li><a href='Contact.php'>Contact</a></li>
</ul>
</div>
</div>
</body>
</html>
내 CSS 할 수 있다면
<style>
@charset "UTF-8";
@import url(http://fonts.googleapis.com/css?family=Oxygen+Mono);
#blue{
height:400px;
background-color:blue;
}
#cssmenu{
clear:both;
float:left;
margin:0;
padding:0;
width:100%;
background:#fff;
position:relative;
}
div ul {
float:right;
list-style: none;
margin:0;
padding: 0;
position: relative;
right:50%;
}
div ul:after {
content: ""; clear: both; display: block;
}
div ul li {
float: left;
margin:0 0 0 1px;
padding:0;
position:relative;
left:50%;
top:1px;
}
div ul li:hover {
background: #4b545f;
}
div ul li:hover a {
color: #fff;
}
div ul li a {
display: block;
margin:0;
padding:.6em .5em .4em;
font-size:1em;
line-height:1em;
background:#ddd;
color: #444;
text-decoration: none;
}
div ul ul {
display:none;
position: absolute;
top: 2em;
left:0;
right:auto;
width:10em;
}
div ul li:hover > ul {
display: block;
}
div ul ul li {
left:auto;
margin:0;
clear:left;
width:100%;
}
div ul ul li a {
padding: 15px 40px;
color: #fff;
}
div ul ul li a:hover {
background: #4b545f;
}
div ul ul ul {
position: absolute;
left: 100%;
top:0;
}
저를 도와주세요.
당신이 달성하려고하는지에 조금 더 선명도를 줄 수 있습니까? 그 소리 (그리고 외모)에서, 당신은 당신의 페이지에 배경 이미지를 원하고, 페이지 구조에 파란색 배경을 가진 DIV 요소를 원한다. 그 맞습니까? – Ben
네, 맞습니다. 기본적으로 상자 안의 상자를 상상해보십시오. 바깥 쪽 상자는 페이지이고 그 상자 전체의 배경 이미지는 'x'입니다. 내부 상자에는 배경색 (파란색)이 있습니다. 내부 상자에는 드롭 다운 메뉴가 표시되고, 앞으로는 더 많은 정보가 표시됩니다. DIV 요소를 사용하는 것이 div 요소를 사용하는지 여부를 확인하는 유일한 방법인지는 확실하지 않습니다. 그게 clarifiy 도움이되기를 바랍니다. – Jimbob
좋아, 상당히 간단하게 들린다. 나는 대답을 게시하고 거기에서 계속할 수 있습니다. – Ben