이 다음과 같은 CSS 규칙 추가 수정하려면 : : 나 이미지 추가 할 경우 여기에
코드입니다 기본적으로
html, body {
margin: 0;
padding: 0;
min-height: 100%;
}
를 페이지는이 원인 때문에 foolowing 위쪽 여백이있다 공백 문자가 있으면이 CSS 코드가 재설정됩니다. 여기
내가 무슨 짓을 :
<html>
<head>
<title>NostalgiaRP LS</title>
<style>
html, body {
margin: 0;
padding: 0;
min-height: 100%;
}
</style>
</head>
<body>
<script type="text/javascript">
<!--Put keywords in here to display when loading.-->
keywords =
[
"Hacking Razley.",
"Getting your credit card information.",
"ED is coding your stuff!",
"Downloading a bunch of crap.",
"Demoting admins.",
"Fixing server bugs.",
"Braking the game.",
"Banning minges.",
"Drawing ponies!:D.",
"Checking your Steam ID.",
"Removing System 32.",
"Rehashing the MD5 algorithm.",
"Bathing Father Grigori.",
"Decrypting your steam account password.",
"Re installing Garry's Mod.",
"Killing Alyx.",
"Reloading guns.",
"Enter a useless message here!",
"Asking for you to become an admin.",
"Eating Watermelons.",
"RDM.",
"Fixing Source Engine.",
"Drawing on walls.",
"Taming Physics.",
"Drinking Vodka...",
"Sleeping.",
"Fixing Gman's suit.",
"Watching stuff and things...",
"Reducing your lifespan.",
"Joining the server.",
"Delaying Episode 3.",
"Uploading virus.",
"......"
]
var bCanChangeStatus = true;
function ChangeText () {
if (bCanChangeStatus)
{
var keyword = keywords[ Math.floor(Math.random() * keywords.length) ]
document.getElementById("loadingtext").innerHTML = keyword;
}
setTimeout("ChangeText()", 2500);
}
ChangeText();
var iFilesNeeded = 0;
var iFilesTotal = 0;
var bDownloadingFile = false;
function SetFilesNeeded(iNeeded)
{
iFilesNeeded = iNeeded;
RefreshFileBox();
}
function SetFilesTotal(iTotal)
{
iFilesTotal = iTotal;
RefreshFileBox();
}
function DownloadingFile(filename)
{
if (bDownloadingFile)
{
iFilesNeeded = iFilesNeeded - 1;
RefreshFileBox();
}
document.getElementById("loadingtext").innerHTML = "Downloading " + filename;
bCanChangeStatus = false;
setTimeout("bCanChangeStatus = true;", 1000);
bDownloadingFile = true;
}
function SetStatusChanged(status)
{
if (bDownloadingFile)
{
iFilesNeeded = iFilesNeeded - 1;
bDownloadingFile = false;
RefreshFileBox();
}
document.getElementById("loadingtext").innerHTML = status;
bCanChangeStatus = false;
setTimeout("bCanChangeStatus = true;", 1000);
}
function RefreshFileBox()
{
document.getElementById("files").innerHTML = "<img src='/images/loadingscreen/download.png' style='position: relative; top: 7px;'> " + iFilesNeeded + " downloads remaining";
if (iFilesTotal > 0)
document.getElementById("files").style.visibility = 'visible';
else
document.getElementById("files").style.visibility = 'hidden';
}
RefreshFileBox();
</script>
<iframe width="0%" height="0" scrolling="no" frameborder="no" src="https://w.soundcloud.com/player/?url=https%3A//api.soundcloud.com/tracks/16687438&auto_play=true&hide_related=false&show_comments=true&show_user=true&show_reposts=false&visual=true"></iframe>
<center>
<div style="position: absolute;">
<!-- Put the image URL here!!-->
<img src="http://oi58.tinypic.com/2wmou89.jpg" style="height: 100%; max-width:100%; max-height:100%;" alt="">
<div id="loadingtext" style="position:absolute; top:50%; left:50%; color: #666; font-family: Arial; font-size: 12px; margin-top:-6px; width:128px; margin-left:-64px; font-weight: bold;">Loading Text..</div>
</div>
</div>
</center>
<div style='-webkit-box-reflect: below -120px -webkit-gradient(linear, left top, left bottom, from(transparent), color-stop(0.1, transparent), to(rgba(255, 255, 255, 1.0))); position: absolute; top: 90%; right: 0; bottom: 0; left: 5%; height: 100px; overflow: show; font-family: Arial; font-size: 24px; font-weight: bold; color: #888' id='files'>
</div>
</div>
</body>
</html>
그리고 전체 화면을 맞는 이미지를 얻을.
'width'와'height' 속성을 사용하고있는 것이 아닙니까? http://jsfiddle.net/YvQ5c – nkmol