나는 marquee없이 div의 뒷면에 넣을 내부 marquee로 div를 만들려고합니다.
영역 div의 뒤쪽에 marquee div를 넣는 데 문제가 있습니다. CSS를 사용하여 어떻게 할 수 있습니까? 나는 이미 z-index : -9999를 넣었습니다. 움직이는 div에 있지만 작동하지 않는 것 같습니다.
여기 내 코드입니다
HTML
<body>
<div id="container" >
<div id="sphere" >
<marquee>
<div id="moving">
</div>
</marquee>
</div>
</div
</body>
CSS
#container{
width:200px;
height:100px;
background-color:#000;
}
#sphere{
width:100px;
height:100px;
border-radius:50px;
background-color:#fff;
opacity:0.6; // i reduce the opacity of the sphere so I can see the moving div at the back
margin:auto;
z-index:99999;
}
#moving{
width:50px;
height:50px;
background-color:green;
margin-top:25px;
z-index:-999999;
}
아래 이미지는 내가 무엇을하고 싶은지 보여줍니다.
기본적으로 구의 뒤쪽에 움직이는 div를 놓고 싶습니다.
미리 감사드립니다
추가 overflow: hidden;
에 #sphere
.
#sphere {
width: 100px;
height: 100px;
border-radius: 50px;
background-color: #fff;
opacity:0.6;
overflow: hidden;
margin: auto;
z-index:99999;
}
CSS : 오버플로
이 기사는 인터넷에서 수집됩니다. 재 인쇄 할 때 출처를 알려주십시오.
침해가 발생한 경우 연락 주시기 바랍니다[email protected] 삭제
몇 마디 만하겠습니다