div질문이요~
<style type="text/css">
#swleft img {
width: 80px;
height: 170px;
position: absolute;
top:0;
left:0;
z-index:12;
}
#swright img {
width: 80px;
height: 170px;
position: absolute;
top:50%;
right:0;
z-index:12;
}
</style>
이렇게 스타일은 줬는데요~
지금위 코드론 맨위에 붙어있어서..
top부분을...
px,%로 조절해보니
디바이스 크기에따라
첨부파일처럼 위치가 변하는데 어떻해야할까요/>ㅠㅠㅠ
제가원하는건 맨위그림처럼
가운데 양끝에 위치해있는겁니다.
어느 크기의 디바이스라도..
질문해결이 안되다시 올립니다.
가로로 늘리게 되면 이동됩니다.
세로로 이동했을땐 상관없는데..
#swleft img {
width: 80px;
height: 170px;
position: absolute;
top:0;
left:0;
z-index:12;
}
#swright img {
width: 80px;
height: 170px;
position: absolute;
top:50%;
right:0;
z-index:12;
}
</style>
이렇게 스타일은 줬는데요~
지금위 코드론 맨위에 붙어있어서..
top부분을...
px,%로 조절해보니
디바이스 크기에따라
첨부파일처럼 위치가 변하는데 어떻해야할까요/>ㅠㅠㅠ
제가원하는건 맨위그림처럼
가운데 양끝에 위치해있는겁니다.
어느 크기의 디바이스라도..
질문해결이 안되다시 올립니다.
가로로 늘리게 되면 이동됩니다.
세로로 이동했을땐 상관없는데..
첨부파일
|
댓글을 작성하시려면 로그인이 필요합니다.
댓글 1개
<div style="position:relative;height:200px;width:300px;background:#777;">
<div style="position: absolute;left:5px;top:50%;margin-top:-10px;width:30px;height:20px;background:#fff;"></div>
<div style="position: absolute;right:5px;top:50%;margin-top:-10px;width:30px;height:20px;background:#fff;"></div>
</div>
이런식으로