div를 아래로 이동하려고하지만 백분율로 쓰면 움직이지 않지만 픽셀에서는 작동합니다. html로 여기%로 div를 이동할 수 없습니다
<style type="text/css">
html
{
width:100%;
height:100%;
overflow-x:hidden;
overflow-y:auto;
}
div#container
{
position:relative;
width: 100%;
margin-top: 0px;
margin-left: auto;
margin-right: auto;
text-align:left;
}
#g_image3
{
width: 100%;
}
body {text-align:center;margin:0}
</style>`
것 :
<body bgColor="#000000">
<div id="container">
<div id="g_image3" style="position:absolute; overflow:hidden; left:0px; top:0px; z-
index:1"><img src="images/top_bg.jpg" alt="" title="" border=0 width="100%"
heigth="100%"></div>
<div id="g_image4" style="position:absolute; overflow:hidden; left:0px; top: 10%;
width:265px; height:400px; z-index:1"><img src="images/content1.png" alt="" title=""
border=0 width=265 height=400></div>
</div>
</body>
Here is a link with the picture of a page
내가 바닥에 g_image4 이동하려는하지만이 g_image3의
집착 남아 계속 여기
html
요소에
height: 100%
을 설정하지만,
body
및
#container
요소를 그렇게 소홀히
코드를 더 읽기 좋게 만들고 [jsfiddle] (http://jsfiddle.net) – Adrift
을 포함 시키십시오. CSS가있는 이유와 인라인 스타일이있는 이유를 모르겠습니다. .. 둘 다 사용하면 실제로 어느 것이 적용되고 있는지 혼란스럽게 할 것입니다. ! 중요한 다른 속성 우선 순위를주고 싶다면 –
잘 CSS를 삭제했지만 여전히 움직이지 않는다. – 14k