到目前为止,我刚刚进入编码大约一个星期左右大约需要5-6个小时,但是出于某种原因我的背景只能在Safari中显示?
html{
background-image: url(pics/doucheklein.jpg);
height: 100%;
}
body {
font-family: "Comic Sans MS";
}
em{
font-weight: bold;
color: aliceblue;
}
em1{
font-weight: bold;
color:chartreuse;
}
img {
border: 1px solid black;
outline: 5px inset blue;
}
#prankerinfo {
top: 50px;
left: 50px;
width: 100px;
height: 400px;
position: absolute;
border-style: solid;
border-left-width: thick;
border-color: black;
}
#sickprankerpic {
top: 200px;
left: 450px;
height: auto;
position: absolute;
border-style: double;
border-width: thick;
border-color: black;
}
#gmaps{
top:300px;
left: 300px;
width: 300px;
height: 300px;
position: absolute;
}
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="style.css">
<title>Sarude Dankstorm</title>
</head>
<body>
<div id="prankerinfo">
<h4>The best prankster on youtube!</h4>
<p><a href="https://www.youtube.com/user/JoeySalads"><b><u><i>Subscribe</i></u></b></a></p>
<p><em>Name:</em>Sick prankster Afghanistan</p>
<p><em1>Adress:</em1><a href="https://www.google.nl/maps/place/Peachy+In+The+Secret+Hideout/@1.3041018,103.8581836,17z/data=!4m12!1m6!3m5!1s0x31da19b6c17eb7d1:0x2d021381dbf79a7b!2sPeachy+In+The+Secret+Hideout!8m2!3d1.3040964!4d103.8603723!3m4!1s0x31da19b6c17eb7d1:0x2d021381dbf79a7b!8m2!3d1.3040964!4d103.8603723?hl=nl" </a> Secret hideout</p>
</div>
<div class="gmaps">
<iframe
width="300"
height="250"
frameborder="0" style="border:0"
src="https://www.google.com/maps/embed/v1/place?key=AIzaSyC8YwGwvlNWXGcf92JTE6ymhCMNHp5n4MI
&q=Secret+Hide+Out+ng+Mga+Gadon,Angeles II, Valenzuela, National Capital Region, Philippines" allowfullscreen>
</iframe>
</div>
<div id="sickprankerpic"><iframe width="420" height="315" src="https://www.youtube.com/embed/CHt7EBCgJnI" frameborder="0" allowfullscreen></iframe></div>
</body>
</body1>
</html>
答案 0 :(得分:0)
不确定这是否是好习惯,但它对我有用。我将它应用于css中的html:
html{
background-image: url(seamlessBackground.png);
height: 100%;
}