사이트에서 HTML 및 CSS를 사용하여 다른 이미지를 단순히 차단하는 것입니다. 더 작은 해상도에서는 화면 오른쪽으로 이동하는 데 문제가 있습니다. http://i.imgur.com/hsGT14m.jpgCSS : 다른 화면 해상도에서의 이미지 위치 수정
그러나 것 같습니다 낮은 해상도 (1280X1024)에서 : http://i.imgur.com/byeK41B.jpg이
전체 페이지의 HTML 코드는
는실제 이미지 내가 원하는 (그리고는 1600x1024 해상도로 표시)가 너무처럼 보인다 다음과 같이
는<html>
<head>
<link rel="stylesheet" type="text/css" href="thrall.css">
</head>
<body>
<img src="images/background.jpg" width="1600" length="1200" class="bg">
<img src="images/titlebox.jpg" class="titlebox">
<img src="images/symbol.png" class="symbol">
<img src="images/transbox.jpg" class="transbox">
</body>
</html>
다음 전체 페이지의 CSS가 될 때 :
img.bg {
/* Set rules to fill background */
min-height: 100%;
min-width: 1024px;
/* Set up proportionate scaling */
width: 100%;
height: auto;
/* Set up positioning */
position: fixed;
top: 0;
left: 0;
z-index: -2;
}
@media screen and (max-width: 1024px) { /* Specific to this particular image */
img.bg {
left: 50%;
margin-left: -512px; /* 50% */
}
}
img.titlebox {
/*Keep it bounded for different resolutions*/
max-width: 100%;
height: auto;
width: auto\9; /* ie8 */
/*Position*/
position: absolute;
top: 0;
left: 50%;
margin-left: -500px;
z-index: -1;
}
img.symbol {
/*Keep it bounded for different resolutions*/
max-width: 100%;
height: auto;
width: auto\9; /* ie8 */
margin:auto;
/*Position*/
position: absolute;
top: 5%;
left: 20%;
}
div.containsymbol {
width:100%;
margin:auto;
}
img.transbox {
/*Keep it bounded for different resolutions*/
max-width: 100%;
height: auto;
width: auto\9; /* ie8 */
/*Opacity*/
opacity:0.4;
filter:alpha(opacity=40); /* For IE8 and earlier */
/*Position*/
position: absolute;
top: 21.5%;
left: 50%;
margin-left: -500px;
z-index: -1;
}
}
,
나는이 심볼의 절대 위치 및 그 상대 위치가 해결책이 될 수도에 문제가 있음을 수집,하지만 난 어떤 아니에요을 적용 할 수있는 해상도 myself9and 초래하는 방법을 볼 수있는 경험이 부족 현재 사용 중).
나는 여기에 충분한 정보를 제공해 주셨고 누군가가 줄 수있는 도움이되기를 바랍니다.
죄송합니다. 기호 위치가 수정되지 않았습니다. 사용 된 4 개의 이미지는 다음과 같습니다. http://imgur.com/LHkfxSZ,T9Ku8uw,n3lCA81,ixA75OS –
전체 코드를 입력하십시오. –
주 기사에 추가했습니다. –